From a7bbdc81ffc423a1486747bd0e1663fdcf231b23 Mon Sep 17 00:00:00 2001 From: Andrea Carraro Date: Sun, 29 Sep 2024 11:34:22 +0200 Subject: [PATCH] test: enable type check --- .gitignore | 1 + package.json | 2 +- vitest.config.mts | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 7f254f66..06b9f6d3 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ node_modules dist coverage +*-temp.json # Trailing dotted files !.editorconfig diff --git a/package.json b/package.json index 848dcd8a..7f3ca2c5 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ ], "scripts": { "build": "rimraf ./dist && tsc -p tsconfig.build.json", - "test": "vitest --config ./vitest.config.mts --dir ./test", + "test": "vitest --config ./vitest.config.mts", "pretest": "npm run test:build", "test:build": "npm --prefix ./examples/fastify-integration-plugin run generate-schemas", "prepare": "npx simple-git-hooks && npm run test -- --run && npm run source:check && npm run build", diff --git a/vitest.config.mts b/vitest.config.mts index c1fa51cd..ea918330 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -1,8 +1,12 @@ -import { defineConfig } from 'vite'; +import { defineConfig, defaultInclude } from 'vitest/config'; export default defineConfig({ test: { - typecheck: { enabled: true }, + dir: './test', + typecheck: { + enabled: true, + include: defaultInclude, + }, setupFiles: ['vitest.setup.ts'], pool: 'forks', poolOptions: {