Due to the pattern `**/specs/*.spec.js` defined in CircleCI, none of the frontend spec in the folders such as `specs/<domain-name>/getters.spec.js` were not executed in Circle CI. This PR fixes the issue, along with the following changes: - Use vitest instead of jest - Remove jest dependancies - Update tests to work with vitest --------- Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
43 lines
1.2 KiB
TypeScript
43 lines
1.2 KiB
TypeScript
import path from 'path';
|
|
import { defineConfig } from 'vitest/config';
|
|
import Vue2 from '@vitejs/plugin-vue2';
|
|
|
|
export default defineConfig({
|
|
plugins: [Vue2()],
|
|
test: {
|
|
environment: 'jsdom',
|
|
include: ['app/**/*.{test,spec}.?(c|m)[jt]s?(x)'],
|
|
coverage: {
|
|
reporter: ['lcov', 'text'],
|
|
include: ['app/**/*.js', 'app/**/*.vue'],
|
|
exclude: [
|
|
'app/**/*.@(spec|stories|routes).js',
|
|
'**/specs/**/*',
|
|
'**/i18n/**/*',
|
|
],
|
|
},
|
|
globals: true,
|
|
outputFile: 'coverage/sonar-report.xml',
|
|
server: {
|
|
deps: {
|
|
inline: ['tinykeys', '@material/mwc-icon'],
|
|
},
|
|
},
|
|
setupFiles: ['fake-indexeddb/auto'],
|
|
mockReset: true,
|
|
clearMocks: true,
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
dashboard: path.resolve('./app/javascript/dashboard'),
|
|
widget: path.resolve('./app/javascript/widget'),
|
|
survey: path.resolve('./app/javascript/survey'),
|
|
assets: path.resolve('./app/javascript/dashboard/assets'),
|
|
components: path.resolve('./app/javascript/dashboard/components'),
|
|
helpers: path.resolve('./app/javascript/shared/helpers'),
|
|
v3: path.resolve('./app/javascript/v3'),
|
|
shared: path.resolve('./app/javascript/shared'),
|
|
},
|
|
},
|
|
});
|