forked from jhipster/jhipster-lite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
98 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": ["esnext", "dom", "dom.iterable"], | ||
"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/**/*"] | ||
} |
82 changes: 42 additions & 40 deletions
82
src/main/resources/generator/client/react/vitest.config.ts.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,49 @@ | ||
/// <reference types="vitest" /> | ||
|
||
import { defineConfig } from 'vite'; | ||
import tsconfigPaths from 'vite-tsconfig-paths'; | ||
import react from '@vitejs/plugin-react'; | ||
import { mergeConfig, defineConfig, configDefaults } from 'vitest/config' | ||
import viteConfig from './vite.config' | ||
|
||
export default defineConfig({ | ||
plugins: [react(), tsconfigPaths()], | ||
test: { | ||
reporters: ['verbose', 'vitest-sonar-reporter'], | ||
outputFile: { | ||
'vitest-sonar-reporter': '{{projectBuildDirectory}}/test-results/TESTS-results-sonar.xml', | ||
}, | ||
globals: true, | ||
logHeapUsage: true, | ||
poolOptions: { | ||
threads: { | ||
minThreads: 1, | ||
maxThreads: 2, | ||
export default mergeConfig( | ||
viteConfig, | ||
defineConfig({ | ||
test: { | ||
root: '.', | ||
reporters: ['verbose', 'vitest-sonar-reporter'], | ||
outputFile: { | ||
'vitest-sonar-reporter': '{{projectBuildDirectory}}/test-results/TESTS-results-sonar.xml', | ||
}, | ||
}, | ||
environment: 'jsdom', | ||
cache: false, | ||
include: ['src/test/javascript/spec/**/*.(spec|test).(ts|tsx)'], | ||
exclude: ['node_modules', 'src/test/javascript/integration/**/*.spec.ts'], | ||
coverage: { | ||
all: true, | ||
thresholds: { | ||
perFile: true, | ||
autoUpdate: true, | ||
100: true, | ||
globals: true, | ||
logHeapUsage: true, | ||
poolOptions: { | ||
threads: { | ||
minThreads: 1, | ||
maxThreads: 2, | ||
}, | ||
}, | ||
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, | ||
provider: 'istanbul', | ||
reportsDirectory: '{{projectBuildDirectory}}/test-results/', | ||
reporter: ['html', 'json-summary', 'text', 'text-summary', 'lcov', 'clover'], | ||
watermarks: { | ||
statements: [100, 100], | ||
branches: [100, 100], | ||
functions: [100, 100], | ||
lines: [100, 100], | ||
environment: 'jsdom', | ||
cache: false, | ||
include: ['src/test/javascript/spec/**/*.{test,spec}.?(c|m)[jt]s?(x)'], | ||
coverage: { | ||
thresholds: { | ||
perFile: true, | ||
autoUpdate: true, | ||
100: true, | ||
}, | ||
include: ['src/main/webapp/**/*.ts?(x)'], | ||
exclude: [ | ||
...configDefaults.coverage.exclude, | ||
'src/main/webapp/app/index.tsx', | ||
], | ||
provider: 'istanbul', | ||
reportsDirectory: '{{projectBuildDirectory}}/test-results/', | ||
reporter: ['html', 'json-summary', 'text', 'text-summary', 'lcov', 'clover'], | ||
watermarks: { | ||
statements: [100, 100], | ||
branches: [100, 100], | ||
functions: [100, 100], | ||
lines: [100, 100], | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); | ||
}) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 43 additions & 44 deletions
87
src/main/resources/generator/client/vue/vitest.config.ts.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,50 @@ | ||
/// <reference types="vitest" /> | ||
|
||
import { defineConfig } from 'vite'; | ||
import tsconfigPaths from 'vite-tsconfig-paths'; | ||
import vue from '@vitejs/plugin-vue'; | ||
import { mergeConfig, defineConfig, configDefaults } from 'vitest/config' | ||
import viteConfig from './vite.config' | ||
|
||
export default defineConfig({ | ||
plugins: [vue(), tsconfigPaths()], | ||
test: { | ||
reporters: ['verbose', 'vitest-sonar-reporter'], | ||
outputFile: { | ||
'vitest-sonar-reporter': '{{projectBuildDirectory}}/test-results/TESTS-results-sonar.xml', | ||
}, | ||
globals: true, | ||
logHeapUsage: true, | ||
poolOptions: { | ||
threads: { | ||
minThreads: 1, | ||
maxThreads: 2, | ||
export default mergeConfig( | ||
viteConfig, | ||
defineConfig({ | ||
test: { | ||
root: '.', | ||
reporters: ['verbose', 'vitest-sonar-reporter'], | ||
outputFile: { | ||
'vitest-sonar-reporter': '{{projectBuildDirectory}}/test-results/TESTS-results-sonar.xml', | ||
}, | ||
}, | ||
environment: 'jsdom', | ||
cache: false, | ||
include: ['src/test/javascript/spec/**/*.(spec|test).(ts|tsx)'], | ||
exclude: ['node_modules', 'src/test/javascript/integration/**/*.spec.ts'], | ||
coverage: { | ||
thresholds: { | ||
perFile: true, | ||
autoUpdate: true, | ||
100: true, | ||
globals: true, | ||
logHeapUsage: true, | ||
poolOptions: { | ||
threads: { | ||
minThreads: 1, | ||
maxThreads: 2, | ||
}, | ||
}, | ||
exclude: [ | ||
'src/main/webapp/**/*.component.ts', | ||
'src/main/webapp/app/main.ts', | ||
'.eslintrc.cjs', | ||
'.lintstagedrc.cjs', | ||
'src/test/**/*', | ||
'{{projectBuildDirectory}}/**', | ||
], | ||
provider: 'istanbul', | ||
reportsDirectory: '{{projectBuildDirectory}}/test-results/', | ||
reporter: ['html', 'json-summary', 'text', 'text-summary', 'lcov', 'clover'], | ||
watermarks: { | ||
statements: [100, 100], | ||
branches: [100, 100], | ||
functions: [100, 100], | ||
lines: [100, 100], | ||
environment: 'jsdom', | ||
cache: false, | ||
include: ['src/test/javascript/spec/**/*.{test,spec}.?(c|m)[jt]s?(x)'], | ||
coverage: { | ||
thresholds: { | ||
perFile: true, | ||
autoUpdate: true, | ||
100: true, | ||
}, | ||
include: ['src/main/webapp/**/*.ts?(x)'], | ||
exclude: [ | ||
...configDefaults.coverage.exclude, | ||
'src/main/webapp/app/main.ts', | ||
'src/main/webapp/**/*.component.ts', | ||
], | ||
provider: 'istanbul', | ||
reportsDirectory: '{{projectBuildDirectory}}/test-results/', | ||
reporter: ['html', 'json-summary', 'text', 'text-summary', 'lcov', 'clover'], | ||
watermarks: { | ||
statements: [100, 100], | ||
branches: [100, 100], | ||
functions: [100, 100], | ||
lines: [100, 100], | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); | ||
}) | ||
); |