Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
murdos committed Jul 28, 2024
1 parent db738b9 commit 0500d7d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 41 deletions.
26 changes: 12 additions & 14 deletions src/main/resources/generator/client/react/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
{
"compilerOptions": {
"target": "ESNext",
"target": "esnext",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"allowJs": false,
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"jsx": "react-jsx",
"skipLibCheck": true,
"resolveJsonModule": true,
"esModuleInterop": false,
"lib": ["dom", "DOM.Iterable", "esnext"],
"types": ["vitest/globals"],
"baseUrl": ".",
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"composite": false,
"module": "esnext",
"moduleResolution": "node",
"baseUrl": "src",
"types": ["vitest/globals"],
"paths": {
"@/*": ["main/webapp/app/*"],
"@assets/*": ["main/webapp/assets/*"]
"@/*": ["src/main/webapp/app/*"],
"@assets/*": ["src/main/webapp/assets/*"]
}
},
"include": ["vite.config.ts", "src"],
"exclude": ["src/test/javascript/integration/**/*spec.ts", "node_modules"]
"include": ["src/main/**/*", "src/test/javascript/spec/**/*.ts"]
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
/// <reference types="vitest" />

import { defineConfig } from 'vite';
import { coverageConfigDefaults, defineConfig } from 'vitest/config'
import tsconfigPaths from 'vite-tsconfig-paths';
import react from '@vitejs/plugin-react';
import path from 'path';

export default defineConfig({
plugins: [react(), tsconfigPaths()],
resolve: {
alias: [{ find: '@', replacement: path.resolve(__dirname, 'src/main/webapp/app') }],
},
test: {
reporters: ['verbose', 'vitest-sonar-reporter'],
outputFile: {
Expand All @@ -25,18 +22,15 @@ export default defineConfig({
},
environment: 'jsdom',
cache: false,
include: ['src/test/javascript/spec/**/*.(spec|test).(ts|tsx)'],
exclude: ['node_modules', 'src/test/javascript/integration/**/*.spec.ts'],
include: ['src/test/javascript/spec/**/*.{test,spec}.?(c|m)[jt]s?(x)'],
coverage: {
all: true,
thresholds: {
perFile: true,
autoUpdate: true,
100: true,
},
include: ['src/main/webapp/app/**/*.ts', 'src/main/webapp/app/**/*.tsx'],
exclude: ['src/main/webapp/app/index.tsx', 'src/main/webapp/app/**/*.d.ts'],
clean: true,
include: ['src/main/webapp/app/**/*.ts?(x)'],
exclude: ['src/main/webapp/app/index.tsx', ...coverageConfigDefaults.exclude],
provider: 'istanbul',
reportsDirectory: '{{projectBuildDirectory}}/test-results/',
reporter: ['html', 'json-summary', 'text', 'text-summary', 'lcov', 'clover'],
Expand Down
9 changes: 1 addition & 8 deletions src/main/resources/generator/client/vue/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,5 @@
"@/*": ["src/main/webapp/app/*"]
}
},
"include": [
"src/main/webapp/**/*.ts",
"src/main/webapp/**/*.d.ts",
"src/main/webapp/**/*.tsx",
"src/main/webapp/**/*.vue",
"src/test/javascript/spec/**/*.ts"
],
"exclude": ["./node_modules"]
"include": ["src/main/**/*", "src/test/javascript/spec/**/*.ts"]
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
/// <reference types="vitest" />

import { defineConfig } from 'vite';
import { coverageConfigDefaults, defineConfig } from 'vitest/config'
import tsconfigPaths from 'vite-tsconfig-paths';
import vue from '@vitejs/plugin-vue';
import path from 'path';

export default defineConfig({
plugins: [vue()],
resolve: {
alias: [{ find: '@', replacement: path.resolve(__dirname, 'src/main/webapp/app') }],
},
plugins: [vue(), tsconfigPaths()],
test: {
reporters: ['verbose', 'vitest-sonar-reporter'],
outputFile: {
Expand All @@ -24,8 +22,7 @@ export default defineConfig({
},
environment: 'jsdom',
cache: false,
include: ['src/test/javascript/spec/**/*.(spec|test).(ts|tsx)'],
exclude: ['node_modules', 'src/test/javascript/integration/**/*.spec.ts'],
include: ['src/test/javascript/spec/**/*.{test,spec}.?(c|m)[jt]s?(x)'],
coverage: {
thresholds: {
perFile: true,
Expand All @@ -35,10 +32,9 @@ export default defineConfig({
exclude: [
'src/main/webapp/**/*.component.ts',
'src/main/webapp/app/main.ts',
'.eslintrc.cjs',
'.lintstagedrc.cjs',
'src/test/**/*',
'{{projectBuildDirectory}}/**',
...coverageConfigDefaults.exclude,
],
provider: 'istanbul',
reportsDirectory: '{{projectBuildDirectory}}/test-results/',
Expand Down

0 comments on commit 0500d7d

Please sign in to comment.