diff --git a/knip.json b/knip.json index b37bb19..8d7acb0 100644 --- a/knip.json +++ b/knip.json @@ -1,5 +1,5 @@ { "$schema": "https://unpkg.com/knip@6/schema.json", - "entry": ["scripts/*.mjs"], + "entry": ["scripts/*.mjs", "src/**/*.test-d.ts"], "project": ["src/**/*.ts", "scripts/*.mjs"] } diff --git a/src/__tests__/index.ts b/src/__tests__/index.test.ts similarity index 100% rename from src/__tests__/index.ts rename to src/__tests__/index.test.ts diff --git a/src/__tests__/path-parts.ts b/src/__tests__/path-parts.test.ts similarity index 100% rename from src/__tests__/path-parts.ts rename to src/__tests__/path-parts.test.ts diff --git a/src/__tests__/properties.ts b/src/__tests__/properties.test.ts similarity index 100% rename from src/__tests__/properties.ts rename to src/__tests__/properties.test.ts diff --git a/vitest.config.mts b/vitest.config.mts index c1ab2d0..e235735 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -1,17 +1,8 @@ -import {configDefaults, defineConfig, type ViteUserConfig} from 'vitest/config' +import {defineConfig, type ViteUserConfig} from 'vitest/config' const config: ViteUserConfig = defineConfig({ test: { - include: ['src/**/__tests__/**/*.ts'], - exclude: [ - ...configDefaults.exclude, - // Shared helpers, not a test file. - 'src/__tests__/utils.ts', - // Type tests: `npm run typecheck` checks them. At runtime every - // `expectTypeOf` call is a no-op, so they would pass without testing - // anything. - 'src/**/*.test-d.ts', - ], + include: ['src/**/__tests__/**/*.test.ts'], coverage: { provider: 'v8', include: ['src/**/*.ts'],