`@monaco-editor` needs to be inlined in order to run the tests smoothly without any errors. Note: dependencies include both `@monaco-editor` and `monaco-editor`, only the `@` one needs to be inlined in test dependencies.
34 lines
649 B
TypeScript
34 lines
649 B
TypeScript
import react from '@vitejs/plugin-react';
|
|
|
|
const config = {
|
|
plugins: [react()],
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
setupFiles: ['./src/test/setup.ts'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
},
|
|
server: {
|
|
deps: {
|
|
inline: ['vitest-canvas-mock', '@patternfly', '@monaco-editor'],
|
|
},
|
|
},
|
|
testTimeout: 10000,
|
|
fileParallelism: false,
|
|
},
|
|
reporters: ['default', 'junit'],
|
|
outputFile: {
|
|
junit: './coverage/junit.xml',
|
|
},
|
|
resolve: {
|
|
mainFields: ['module'],
|
|
},
|
|
esbuild: {
|
|
loader: 'tsx',
|
|
include: /src\/.*\.[tj]sx?$/,
|
|
exclude: [],
|
|
},
|
|
};
|
|
|
|
export default config;
|