Skip to content

Commit

Permalink
test: don't rely on order
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed May 30, 2023
1 parent 3fc3fce commit 0cbb96e
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions test/public-api/tests/runner.spec.ts
Expand Up @@ -46,8 +46,21 @@ it.each([
const files = vitest?.state.getFiles() || []
expect(files).toHaveLength(1)

expect(taskUpdate[0][2]).toEqual(suiteMeta)
expect(taskUpdate[1][2]).toEqual(testMeta)
expect(taskUpdate).toContainEqual(
expect.arrayContaining([
expect.any(String),
expect.anything(),
suiteMeta,
]),
)

expect(taskUpdate).toContainEqual(
expect.arrayContaining([
expect.any(String),
expect.anything(),
testMeta,
]),
)

expect(finishedFiles[0].meta).toEqual(suiteMeta)
expect(finishedFiles[0].tasks[0].meta).toEqual(testMeta)
Expand Down

0 comments on commit 0cbb96e

Please sign in to comment.