Home / Function/ expectByPolling() — vue Function Reference

expectByPolling() — vue Function Reference

Architecture documentation for the expectByPolling() function in e2eUtils.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  36edd0ea_f25f_0052_fc51_111cc3b8b12b["expectByPolling()"]
  8980146f_f4b3_e607_53b0_78c2e02faf9f["timeout()"]
  36edd0ea_f25f_0052_fc51_111cc3b8b12b -->|calls| 8980146f_f4b3_e607_53b0_78c2e02faf9f
  style 36edd0ea_f25f_0052_fc51_111cc3b8b12b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

test/e2e/e2eUtils.ts lines 24–37

export async function expectByPolling(
  poll: () => Promise<any>,
  expected: string
) {
  for (let tries = 0; tries < maxTries; tries++) {
    const actual = (await poll()) || ''
    if (actual.indexOf(expected) > -1 || tries === maxTries - 1) {
      expect(actual).toMatch(expected)
      break
    } else {
      await timeout(50)
    }
  }
}

Domain

Subdomains

Calls

Frequently Asked Questions

What does expectByPolling() do?
expectByPolling() is a function in the vue codebase.
What does expectByPolling() call?
expectByPolling() calls 1 function(s): timeout.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free