- Added "test" script to package.json for running vitest. - Updated api.js to use localhost for backend during development. - Created utils.spec.js to test calculateDay function with various scenarios. - Updated vite.config.js to include vitest configuration and conditionally load Vue DevTools.
21 lines
532 B
JavaScript
21 lines
532 B
JavaScript
/// <reference types="vitest" />
|
|
import { fileURLToPath, URL } from 'node:url'
|
|
import VueDevTools from 'vite-plugin-vue-devtools'
|
|
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig(({ command }) => ({
|
|
base: '/odoo/',
|
|
plugins: [vue(), ...(command === 'serve' ? [VueDevTools()] : [])],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
},
|
|
},
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
},
|
|
}))
|