feat(frontend): Add vitest and test for form diff
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
modules: ['@nuxt/ui', '@nuxt/eslint', '@pinia/nuxt', '@nuxtjs/i18n', 'nuxt-auth-utils'],
|
modules: ['@nuxt/ui', '@nuxt/eslint', '@pinia/nuxt', '@nuxtjs/i18n', 'nuxt-auth-utils', '@nuxt/test-utils/module'],
|
||||||
css: ['~/assets/css/main.css'],
|
css: ['~/assets/css/main.css'],
|
||||||
runtimeConfig: {
|
runtimeConfig: {
|
||||||
public: {
|
public: {
|
||||||
|
|||||||
@@ -12,7 +12,8 @@
|
|||||||
"type-check": "nuxi typecheck",
|
"type-check": "nuxi typecheck",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"lint:fix": "eslint . --fix",
|
"lint:fix": "eslint . --fix",
|
||||||
"check": "pnpm run lint && pnpm run type-check && pnpm run format",
|
"test": "vitest run",
|
||||||
|
"check": "pnpm run lint && pnpm run type-check && pnpm run format && pnpm run test",
|
||||||
"api:generate": "openapi-generator-cli generate -i ../api/legalconsenthub.yml -g typescript-fetch -o .api-client"
|
"api:generate": "openapi-generator-cli generate -i ../api/legalconsenthub.yml -g typescript-fetch -o .api-client"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -33,10 +34,14 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nuxt/eslint": "1.1.0",
|
"@nuxt/eslint": "1.1.0",
|
||||||
|
"@nuxt/test-utils": "^3.21.0",
|
||||||
"@openapitools/openapi-generator-cli": "2.16.3",
|
"@openapitools/openapi-generator-cli": "2.16.3",
|
||||||
|
"@vue/test-utils": "^2.4.6",
|
||||||
"eslint": "9.20.1",
|
"eslint": "9.20.1",
|
||||||
|
"happy-dom": "^20.0.11",
|
||||||
"prettier": "3.5.1",
|
"prettier": "3.5.1",
|
||||||
"typescript": "5.7.3",
|
"typescript": "5.7.3",
|
||||||
|
"vitest": "^4.0.16",
|
||||||
"vue-tsc": "2.2.2"
|
"vue-tsc": "2.2.2"
|
||||||
},
|
},
|
||||||
"volta": {
|
"volta": {
|
||||||
|
|||||||
575
legalconsenthub/pnpm-lock.yaml
generated
575
legalconsenthub/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
1074
legalconsenthub/test/unit/formDiff.spec.ts
Normal file
1074
legalconsenthub/test/unit/formDiff.spec.ts
Normal file
File diff suppressed because it is too large
Load Diff
23
legalconsenthub/vitest.config.ts
Normal file
23
legalconsenthub/vitest.config.ts
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import { defineConfig } from 'vitest/config'
|
||||||
|
import { defineVitestProject } from '@nuxt/test-utils/config'
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
test: {
|
||||||
|
projects: [
|
||||||
|
{
|
||||||
|
test: {
|
||||||
|
name: 'unit',
|
||||||
|
include: ['test/{e2e,unit}/*.{test,spec}.ts'],
|
||||||
|
environment: 'node'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
await defineVitestProject({
|
||||||
|
test: {
|
||||||
|
name: 'nuxt',
|
||||||
|
include: ['test/nuxt/*.{test,spec}.ts'],
|
||||||
|
environment: 'nuxt'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
]
|
||||||
|
}
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user