[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

fix: don't print column in test names when `includeTaskLocation` is enabled (#10681)

authored by

Vladimir and committed by
GitHub
(Jul 1, 2026, 8:59 AM +0200) bd9cc9d8 9a48d92d

+29 -29
+4 -4
docs/guide/reporters.md
··· 248 248 An example with `--includeTaskLocation`: 249 249 250 250 ```bash 251 - ✓ __tests__/file1.test.ts:2:1 > first test file > 2 + 2 should equal 4 1ms 252 - ✓ __tests__/file1.test.ts:3:1 > first test file > 4 - 2 should equal 2 1ms 253 - ✓ __tests__/file2.test.ts:2:1 > second test file > 1 + 1 should equal 2 1ms 254 - ✓ __tests__/file2.test.ts:3:1 > second test file > 2 - 1 should equal 1 1ms 251 + ✓ __tests__/file1.test.ts:2 > first test file > 2 + 2 should equal 4 1ms 252 + ✓ __tests__/file1.test.ts:3 > first test file > 4 - 2 should equal 2 1ms 253 + ✓ __tests__/file2.test.ts:2 > second test file > 1 + 1 should equal 2 1ms 254 + ✓ __tests__/file2.test.ts:3 > second test file > 2 - 1 should equal 1 1ms 255 255 256 256 Test Files 2 passed (2) 257 257 Tests 4 passed (4)
+1 -1
test/e2e/test/no-module-runner.test.ts
··· 517 517 " 518 518 ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯ 519 519 520 - FAIL in-source.ts:12:3 > works 520 + FAIL in-source.ts:12 > works 521 521 Error: test throws correctly 522 522 ❯ <anonymous> in-source.ts:13:11 523 523 11|
+1 -1
test/e2e/test/public-api.test.ts
··· 46 46 47 47 expect(stderr).toBe('') 48 48 49 - expect(stdout).toContain('custom.spec.ts:14:1 > custom') 49 + expect(stdout).toContain('custom.spec.ts:14 > custom') 50 50 51 51 const suiteMeta = { done: true } 52 52 const testMeta = { custom: 'some-custom-handler' }
+13 -13
test/e2e/test/reporters/verbose.test.ts
··· 135 135 }) 136 136 137 137 expect(trimReporterOutput(stdout)).toMatchInlineSnapshot(` 138 - "✓ fixtures/reporters/verbose/example-1.test.ts:3:1 > test pass in root [...]ms 139 - ↓ fixtures/reporters/verbose/example-1.test.ts:5:6 > test skip in root 140 - ✓ fixtures/reporters/verbose/example-1.test.ts:8:3 > suite in root > test pass in 1. suite #1 [...]ms 141 - ✓ fixtures/reporters/verbose/example-1.test.ts:10:3 > suite in root > test pass in 1. suite #2 [...]ms 142 - ✓ fixtures/reporters/verbose/example-1.test.ts:13:5 > suite in root > suite in suite > test pass in nested suite #1 [...]ms 143 - ✓ fixtures/reporters/verbose/example-1.test.ts:15:5 > suite in root > suite in suite > test pass in nested suite #2 [...]ms 144 - × fixtures/reporters/verbose/example-1.test.ts:18:7 > suite in root > suite in suite > suite in nested suite > test failure in 2x nested suite [...]ms 138 + "✓ fixtures/reporters/verbose/example-1.test.ts:3 > test pass in root [...]ms 139 + ↓ fixtures/reporters/verbose/example-1.test.ts:5 > test skip in root 140 + ✓ fixtures/reporters/verbose/example-1.test.ts:8 > suite in root > test pass in 1. suite #1 [...]ms 141 + ✓ fixtures/reporters/verbose/example-1.test.ts:10 > suite in root > test pass in 1. suite #2 [...]ms 142 + ✓ fixtures/reporters/verbose/example-1.test.ts:13 > suite in root > suite in suite > test pass in nested suite #1 [...]ms 143 + ✓ fixtures/reporters/verbose/example-1.test.ts:15 > suite in root > suite in suite > test pass in nested suite #2 [...]ms 144 + × fixtures/reporters/verbose/example-1.test.ts:18 > suite in root > suite in suite > suite in nested suite > test failure in 2x nested suite [...]ms 145 145 → expected 'should fail' to be 'as expected' // Object.is equality 146 - ↓ fixtures/reporters/verbose/example-1.test.ts:26:3 > suite skip in root > test 1.3 147 - ↓ fixtures/reporters/verbose/example-1.test.ts:29:5 > suite skip in root > suite in suite > test in nested suite 148 - ↓ fixtures/reporters/verbose/example-1.test.ts:31:5 > suite skip in root > suite in suite > test failure in nested suite of skipped suite 149 - ✓ fixtures/reporters/verbose/example-2.test.ts:3:1 > test 0.1 [...]ms 150 - ↓ fixtures/reporters/verbose/example-2.test.ts:5:6 > test 0.2 151 - ✓ fixtures/reporters/verbose/example-2.test.ts:8:3 > suite 1.1 > test 1.1 [...]ms" 146 + ↓ fixtures/reporters/verbose/example-1.test.ts:26 > suite skip in root > test 1.3 147 + ↓ fixtures/reporters/verbose/example-1.test.ts:29 > suite skip in root > suite in suite > test in nested suite 148 + ↓ fixtures/reporters/verbose/example-1.test.ts:31 > suite skip in root > suite in suite > test failure in nested suite of skipped suite 149 + ✓ fixtures/reporters/verbose/example-2.test.ts:3 > test 0.1 [...]ms 150 + ↓ fixtures/reporters/verbose/example-2.test.ts:5 > test 0.2 151 + ✓ fixtures/reporters/verbose/example-2.test.ts:8 > suite 1.1 > test 1.1 [...]ms" 152 152 `) 153 153 }) 154 154
+8 -8
test/typescript/test/__snapshots__/runner.test.ts.snap
··· 12 12 `; 13 13 14 14 exports[`should fail > typecheck files 2`] = ` 15 - " FAIL fail.test-d.ts:7:1 > nested suite 15 + " FAIL fail.test-d.ts:7 > nested suite 16 16 TypeCheckError: This expression is not callable. Type 'ExpectVoid<number>' has no call signatures. 17 17 ❯ fail.test-d.ts:15:19 18 18 13| }) ··· 23 23 `; 24 24 25 25 exports[`should fail > typecheck files 3`] = ` 26 - " FAIL expect-error.test-d.ts:4:1 > failing test with expect-error 26 + " FAIL expect-error.test-d.ts:4 > failing test with expect-error 27 27 TypeCheckError: Unused '@ts-expect-error' directive. 28 28 ❯ expect-error.test-d.ts:5:3 29 29 3| // ··· 34 34 `; 35 35 36 36 exports[`should fail > typecheck files 4`] = ` 37 - " FAIL fail.test-d.ts:3:1 > failing test 37 + " FAIL fail.test-d.ts:3 > failing test 38 38 TypeCheckError: Type 'string' does not satisfy the constraint '"Expected string, Actual number"'. 39 39 ❯ fail.test-d.ts:4:33 40 40 2| ··· 45 45 `; 46 46 47 47 exports[`should fail > typecheck files 5`] = ` 48 - " FAIL fail.test-d.ts:9:5 > nested suite > nested 2 > failing test 2 48 + " FAIL fail.test-d.ts:9 > nested suite > nested 2 > failing test 2 49 49 TypeCheckError: This expression is not callable. Type 'ExpectVoid<number>' has no call signatures. 50 50 ❯ fail.test-d.ts:10:23 51 51 8| describe('nested 2', () => { ··· 56 56 `; 57 57 58 58 exports[`should fail > typecheck files 6`] = ` 59 - " FAIL fail.test-d.ts:9:5 > nested suite > nested 2 > failing test 2 59 + " FAIL fail.test-d.ts:9 > nested suite > nested 2 > failing test 2 60 60 TypeCheckError: This expression is not callable. Type 'ExpectUndefined<number>' has no call signatures. 61 61 ❯ fail.test-d.ts:11:23 62 62 9| test('failing test 2', () => { ··· 67 67 `; 68 68 69 69 exports[`should fail > typecheck files 7`] = ` 70 - " FAIL js-fail.test-d.js:5:1 > js test fails 70 + " FAIL js-fail.test-d.js:5 > js test fails 71 71 TypeCheckError: This expression is not callable. Type 'ExpectArray<number>' has no call signatures. 72 72 ❯ js-fail.test-d.js:6:19 73 73 4| ··· 78 78 `; 79 79 80 80 exports[`should fail > typecheck files 8`] = ` 81 - " FAIL node-types.test-d.ts:3:1 > buffer is not available 81 + " FAIL node-types.test-d.ts:3 > buffer is not available 82 82 TypeCheckError: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try \`npm i --save-dev @types/node\` and then add 'node' to the types field in your tsconfig. 83 83 ❯ node-types.test-d.ts:4:3 84 84 2| ··· 89 89 `; 90 90 91 91 exports[`should fail > typecheck files 9`] = ` 92 - " FAIL only.test-d.ts:3:1 > failing test 92 + " FAIL only.test-d.ts:3 > failing test 93 93 TypeCheckError: Type 'string' does not satisfy the constraint '"Expected string, Actual number"'. 94 94 ❯ only.test-d.ts:4:33 95 95 2|
+1 -1
packages/vitest/src/node/reporters/base.ts
··· 307 307 308 308 let name = test.file.name 309 309 if (test.location) { 310 - name += c.dim(`:${test.location.line}:${test.location.column}`) 310 + name += c.dim(`:${test.location.line}`) 311 311 } 312 312 name += separator 313 313 name += getTestName(test, separator)
+1 -1
packages/vitest/src/node/reporters/verbose.ts
··· 26 26 27 27 title += test.module.task.name 28 28 if (test.location) { 29 - title += c.dim(`:${test.location.line}:${test.location.column}`) 29 + title += c.dim(`:${test.location.line}`) 30 30 } 31 31 title += separator 32 32