[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(benchmark): disable type testing while benchmarking (#7068)

authored by

Ari Perkkiö and committed by
GitHub
(Dec 11, 2024, 3:31 PM +0100) 4e60333d 8a6f5f16

+12
+1
tsconfig.check.json
··· 14 14 "./packages/ui/client/**", 15 15 "./examples/**/*.*", 16 16 "./bench/**", 17 + "./test/benchmark/fixtures/**", 17 18 "./test/typescript/**", 18 19 "./test/browser/**", 19 20 "**/coverage/fixtures/**",
+3
test/benchmark/test/basic.test.ts
··· 13 13 root, 14 14 allowOnly: true, 15 15 outputJson: 'bench.json', 16 + 17 + // Verify that type testing cannot be used with benchmark 18 + typecheck: { enabled: true }, 16 19 }, [], 'benchmark') 17 20 expect(result.exitCode).toBe(0) 18 21
+7
test/benchmark/fixtures/basic/should-not-run.test-d.ts
··· 1 + import { describe, expectTypeOf, test } from 'vitest' 2 + 3 + describe('test', () => { 4 + test('some-test', () => { 5 + expectTypeOf({ a: 1 }).toEqualTypeOf({ a: "should not match" }) 6 + }) 7 + })
+1
packages/vitest/src/node/config/resolveConfig.ts
··· 557 557 } 558 558 // override test config 559 559 resolved.coverage.enabled = false 560 + resolved.typecheck.enabled = false 560 561 resolved.include = resolved.benchmark.include 561 562 resolved.exclude = resolved.benchmark.exclude 562 563 resolved.includeSource = resolved.benchmark.includeSource