setup test and get working test file

This commit is contained in:
Triston Armstrong 2024-03-19 00:30:43 -05:00
parent 7f2a9f8e32
commit 2c289ec07c
4 changed files with 23 additions and 5 deletions

BIN
bun.lockb

Binary file not shown.

View File

@ -8,7 +8,9 @@
"build": "tsc && vite build",
"preview": "vite preview",
"tauri": "tauri",
"commit": "cz"
"commit": "cz",
"test:f": "vitest",
"test:f:ui": "bun run test:f --ui"
},
"dependencies": {
"@tauri-apps/api": "^1",
@ -16,13 +18,15 @@
"vite-plugin-kaioken": "^0.0.7"
},
"devDependencies": {
"jsdom": "^24.0.0",
"@tauri-apps/cli": "^1",
"autoprefixer": "^10.4.18",
"cz-conventional-changelog": "^3.3.0",
"postcss": "^8.4.35",
"tailwindcss": "^3.4.1",
"typescript": "^5.0.2",
"vite": "^5.0.0"
"vite": "^5.0.0",
"vitest": "^1.4.0"
},
"config": {
"commitizen": {

7
src/main.spec.ts Normal file
View File

@ -0,0 +1,7 @@
import * as main from "./main.ts"
describe("main", () => {
it("should be defined", () => {
expect(true).toBeTruthy()
})
})

View File

@ -1,5 +1,6 @@
import { defineConfig } from "vite";
import kaioken from "vite-plugin-kaioken";
/// <reference types="vitest" />
import { defineConfig } from "vite"
import kaioken from "vite-plugin-kaioken"
// https://vitejs.dev/config/
export default defineConfig({
@ -25,4 +26,10 @@ export default defineConfig({
ignored: ["**/src-tauri/**"],
},
},
});
envPrefix: ["VITE_", "TAURI_"],
test: {
exclude: ["src-tauri/**/*", "node_modules"],
globals: true,
environment: "jsdom",
},
})