Skip to content

Commit 9719f84

Browse files
authored
Merge branch 'main' into main
2 parents a6811a3 + cc73597 commit 9719f84

File tree

5 files changed

+14
-10
lines changed

5 files changed

+14
-10
lines changed

docs/.vitepress/sponsors.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ export const sponsors: SponsorTier[] = [
5757
url: 'https://www.liminity.se/',
5858
img: '/liminity.svg',
5959
},
60+
{
61+
name: 'Aerius Ventilation',
62+
url: 'https://aerius.se/',
63+
img: '/aerius.png',
64+
},
6065
],
6166
},
6267
]

docs/public/aerius.png

42.2 KB
Loading

packages/runner/src/run.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -658,12 +658,7 @@ export async function runTest(test: Test, runner: VitestRunner): Promise<void> {
658658
})
659659

660660
if (test.result!.state !== 'fail') {
661-
if (!test.repeats) {
662-
test.result!.state = 'pass'
663-
}
664-
else if (test.repeats && retry === retryCount) {
665-
test.result!.state = 'pass'
666-
}
661+
test.result!.state = 'pass'
667662
}
668663
}
669664
catch (e) {

test/cli/fixtures/reported-tasks/1_first.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ it('registers a metadata', (ctx) => {
8686
ctx.task.meta.key = 'value'
8787
})
8888

89+
it('should not show up as pending test when finished (#9689)', { retry: 2, repeats: 2 }, ({ task }) => {
90+
expect(task.result?.state).toBe('run')
91+
})
92+
8993
declare module 'vitest' {
9094
interface TaskMeta {
9195
key?: string

test/cli/test/reported-tasks.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ it('correctly reports a file', ({ testModule, files, project }) => {
7676
expect(testModule.location).toBeUndefined()
7777
expect(testModule.moduleId).toBe(resolve(root, './1_first.test.ts'))
7878
expect(testModule.project).toBe(project)
79-
expect(testModule.children.size).toBe(17)
79+
expect(testModule.children.size).toBe(18)
8080

8181
const tests = [...testModule.children.tests()]
82-
expect(tests).toHaveLength(12)
82+
expect(tests).toHaveLength(13)
8383
const deepTests = [...testModule.children.allTests()]
84-
expect(deepTests).toHaveLength(22)
84+
expect(deepTests).toHaveLength(23)
8585

8686
expect.soft([...testModule.children.allTests('skipped')]).toHaveLength(8)
87-
expect.soft([...testModule.children.allTests('passed')]).toHaveLength(9)
87+
expect.soft([...testModule.children.allTests('passed')]).toHaveLength(10)
8888
expect.soft([...testModule.children.allTests('failed')]).toHaveLength(5)
8989
expect.soft([...testModule.children.allTests('pending')]).toHaveLength(0)
9090

0 commit comments

Comments
 (0)