···85858686 const message = removeLines(stderr.replace(resolve(import.meta.dirname, '..'), '<root>'))
87878888- expect(message).toMatchSnapshot()
8888+ expect(message.replace('Testing types with tsc and vue-tsc is an experimental feature.\nBreaking changes might not follow SemVer, please pin Vitest\'s version when using it.\n', '')).toMatchSnapshot()
8989 })
9090})
9191
···100100`;
101101102102exports[`should fail > typechecks empty "include" but with tests 1`] = `
103103-"Testing types with tsc and vue-tsc is an experimental feature.
104104-Breaking changes might not follow SemVer, please pin Vitest's version when using it.
105105-⎯⎯ Unhandled Errors ⎯⎯
103103+"⎯⎯ Unhandled Errors ⎯⎯
106104107105Vitest caught 1 unhandled error during the test run.
108106This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.
+6-1
packages/vitest/src/node/config/resolveConfig.ts
···146146 }
147147}
148148149149+// warn only once, check one PER PROCESS, not per instance,
150150+// that's why it's on a module-level
151151+let warnedTypeCheck = false
152152+149153export function resolveConfig(
150154 vitest: Vitest,
151155 options: UserConfig,
···820824 resolved.typecheck ??= {} as any
821825 resolved.typecheck.enabled ??= false
822826823823- if (resolved.typecheck.enabled) {
827827+ if (resolved.typecheck.enabled && !warnedTypeCheck) {
828828+ warnedTypeCheck = true
824829 logger.console.warn(
825830 c.yellow(
826831 'Testing types with tsc and vue-tsc is an experimental feature.\nBreaking changes might not follow SemVer, please pin Vitest\'s version when using it.',