Skip to content

Commit

Permalink
test: update to the correct test (#3643)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunqing committed Jun 26, 2023
1 parent 40f18a0 commit 6d26b8c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
16 changes: 7 additions & 9 deletions test/reporters/tests/default.test.ts
Expand Up @@ -37,21 +37,19 @@ describe('default reporter', async () => {
await vitest.waitForStdout('Input filename pattern')
vitest.write('a\n')
await vitest.waitForStdout('Filename pattern: a')
await vitest.waitForStdout('Waiting for file changes')
await vitest.waitForStdout('Waiting for file changes...')
expect(vitest.stdout).contain('✓ a1 test')
expect(vitest.stdout).contain('✓ nested a3 test')

// rerun and two files
vitest.write('p')
await vitest.waitForStdout('Input filename pattern')
vitest.write('b\n')
await vitest.waitForStdout('Filename pattern: b')
await vitest.waitForStdout('PASS Waiting for file changes...')
expect(vitest.stdout).toContain('RERUN')
expect(vitest.stdout).toContain('b1.test.ts')
expect(vitest.stdout).toContain('b2.test.ts')
expect(vitest.stdout).not.toContain('nested b1 test')
expect(vitest.stdout).not.toContain('b1 test')
expect(vitest.stdout).not.toContain('b2 test')
await vitest.waitForStdout('Waiting for file changes...')
expect(vitest.stdout).toContain('✓ b1.test.ts')
expect(vitest.stdout).toContain('✓ b2.test.ts')
expect(vitest.stdout).not.toContain('✓ nested b1 test')
expect(vitest.stdout).not.toContain('✓ b1 test')
expect(vitest.stdout).not.toContain('✓ b2 test')
})
}, 120000)
3 changes: 3 additions & 0 deletions test/reporters/vitest.config.ts
Expand Up @@ -4,5 +4,8 @@ export default defineConfig({
test: {
exclude: ['node_modules', 'fixtures', 'dist'],
testTimeout: 100000,
chaiConfig: {
truncateThreshold: 9999,
},
},
})

0 comments on commit 6d26b8c

Please sign in to comment.