Skip to content

Commit

Permalink
chore: setup vitest config file
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan-Y-Ko committed Jan 16, 2025
1 parent 72c1700 commit 0bfca36
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default [
"**/*.config.js",
"generate-exports.js",
"vite.config.ts",
"vitest.config.ts",
"**/*.test.ts",
],
},
Expand Down
7 changes: 1 addition & 6 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from "vitest/config";
import { defineConfig } from "vite";
import path from "path";

export default defineConfig({
Expand All @@ -10,9 +10,4 @@ export default defineConfig({
fileName: "index",
},
},
test: {
globals: true,
environment: "node",
include: ["src/**/*.{test,spec}.{ts,js}"],
},
});
12 changes: 12 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig, mergeConfig } from "vitest/config";
import viteConfig from "./vite.config";

export default mergeConfig(
viteConfig,
defineConfig({
test: {
globals: true,
environment: "node",
},
})
);

0 comments on commit 0bfca36

Please sign in to comment.