mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 01:46:07 +00:00
add graphql loader to vitest
This commit is contained in:
parent
119d024a2e
commit
168bad32c5
@ -10,34 +10,37 @@ import path from 'path'
|
||||
// },
|
||||
// })
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [Vue()],
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'jsdom',
|
||||
setupFiles: ['./test/vitest.setup.js'],
|
||||
coverage: {
|
||||
provider: 'v8',
|
||||
reporter: ['text', 'json', 'html'],
|
||||
exclude: ['node_modules/**', 'src/assets/**', '**/*.{spec,test}.js'],
|
||||
lines: 95,
|
||||
export default defineConfig(async () => {
|
||||
const { vitePluginGraphqlLoader } = await import('vite-plugin-graphql-loader')
|
||||
return {
|
||||
plugins: [Vue(), vitePluginGraphqlLoader()],
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'jsdom',
|
||||
setupFiles: ['./test/vitest.setup.js'],
|
||||
coverage: {
|
||||
provider: 'v8',
|
||||
reporter: ['text', 'json', 'html'],
|
||||
exclude: ['node_modules/**', 'src/assets/**', '**/*.{spec,test}.js'],
|
||||
lines: 95,
|
||||
},
|
||||
include: ['**/?(*.)+(spec|test).js?(x)'],
|
||||
moduleNameMapper: {
|
||||
'^@/(.*)$': path.resolve(__dirname, './src/$1'),
|
||||
'\\.(css|less)$': 'identity-obj-proxy',
|
||||
},
|
||||
transformMode: {
|
||||
web: [/\.[jt]sx$/],
|
||||
},
|
||||
deps: {
|
||||
inline: [/vee-validate/, 'vitest-canvas-mock'],
|
||||
},
|
||||
},
|
||||
include: ['**/?(*.)+(spec|test).js?(x)'],
|
||||
moduleNameMapper: {
|
||||
'^@/(.*)$': path.resolve(__dirname, './src/$1'),
|
||||
'\\.(css|less)$': 'identity-obj-proxy',
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
},
|
||||
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
|
||||
},
|
||||
transformMode: {
|
||||
web: [/\.[jt]sx$/],
|
||||
},
|
||||
deps: {
|
||||
inline: [/vee-validate/, 'vitest-canvas-mock'],
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
},
|
||||
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
@ -2,41 +2,44 @@ import { defineConfig } from 'vite'
|
||||
import Vue from '@vitejs/plugin-vue'
|
||||
import path from 'path'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [Vue()],
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'jsdom',
|
||||
// setupFiles: ['./test/vitest.setup.js'],
|
||||
coverage: {
|
||||
provider: 'v8',
|
||||
reporter: ['text', 'json', 'html'],
|
||||
exclude: ['node_modules/**', 'src/assets/**', '**/*.{spec,test}.js'],
|
||||
lines: 95,
|
||||
},
|
||||
include: ['**/?(*.)+(spec|test).js?(x)'],
|
||||
moduleNameMapper: {
|
||||
'^@/(.*)$': path.resolve(__dirname, './src/$1'),
|
||||
'\\.(css|less)$': 'identity-obj-proxy',
|
||||
},
|
||||
transformMode: {
|
||||
web: [/\.[jt]sx$/],
|
||||
},
|
||||
server: {
|
||||
deps: {
|
||||
inline: [/vee-validate/, 'vitest-canvas-mock'],
|
||||
export default defineConfig(async () => {
|
||||
const { vitePluginGraphqlLoader } = await import('vite-plugin-graphql-loader')
|
||||
return {
|
||||
plugins: [Vue(), vitePluginGraphqlLoader()],
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'jsdom',
|
||||
// setupFiles: ['./test/vitest.setup.js'],
|
||||
coverage: {
|
||||
provider: 'v8',
|
||||
reporter: ['text', 'json', 'html'],
|
||||
exclude: ['node_modules/**', 'src/assets/**', '**/*.{spec,test}.js'],
|
||||
lines: 95,
|
||||
},
|
||||
include: ['**/?(*.)+(spec|test).js?(x)'],
|
||||
moduleNameMapper: {
|
||||
'^@/(.*)$': path.resolve(__dirname, './src/$1'),
|
||||
'\\.(css|less)$': 'identity-obj-proxy',
|
||||
},
|
||||
transformMode: {
|
||||
web: [/\.[jt]sx$/],
|
||||
},
|
||||
server: {
|
||||
deps: {
|
||||
inline: [/vee-validate/, 'vitest-canvas-mock'],
|
||||
},
|
||||
},
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
'@test': path.resolve(__dirname, './test'),
|
||||
},
|
||||
},
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
'@test': path.resolve(__dirname, './test'),
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
'@test': path.resolve(__dirname, './test'),
|
||||
},
|
||||
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
'@test': path.resolve(__dirname, './test'),
|
||||
},
|
||||
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user