2 testing foundation #15

Merged
tristonarmstrong merged 2 commits from 2-testing_foundation into main 2024-03-22 03:25:15 +00:00
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", "build": "tsc && vite build",
"preview": "vite preview", "preview": "vite preview",
"tauri": "tauri", "tauri": "tauri",
"commit": "cz" "commit": "cz",
"test:f": "vitest",
"test:f:ui": "bun run test:f --ui"
}, },
"dependencies": { "dependencies": {
"@tauri-apps/api": "^1", "@tauri-apps/api": "^1",
@ -16,13 +18,15 @@
"vite-plugin-kaioken": "^0.0.7" "vite-plugin-kaioken": "^0.0.7"
}, },
"devDependencies": { "devDependencies": {
"jsdom": "^24.0.0",
"@tauri-apps/cli": "^1", "@tauri-apps/cli": "^1",
"autoprefixer": "^10.4.18", "autoprefixer": "^10.4.18",
"cz-conventional-changelog": "^3.3.0", "cz-conventional-changelog": "^3.3.0",
"postcss": "^8.4.35", "postcss": "^8.4.35",
"tailwindcss": "^3.4.1", "tailwindcss": "^3.4.1",
"typescript": "^5.0.2", "typescript": "^5.0.2",
"vite": "^5.0.0" "vite": "^5.0.0",
"vitest": "^1.4.0"
}, },
"config": { "config": {
"commitizen": { "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"; /// <reference types="vitest" />
import kaioken from "vite-plugin-kaioken"; import { defineConfig } from "vite"
import kaioken from "vite-plugin-kaioken"
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
@ -25,4 +26,10 @@ export default defineConfig({
ignored: ["**/src-tauri/**"], ignored: ["**/src-tauri/**"],
}, },
}, },
}); envPrefix: ["VITE_", "TAURI_"],
test: {
exclude: ["src-tauri/**/*", "node_modules"],
globals: true,
environment: "jsdom",
},
})