Files
swagger-ui/config/jest/jest.unit.config.js
Vladimír Gorej 7addbd0eb5 test: consolidate unit tests (#9588)
All mocha tests have been migrated to Jest tests.

Closes #9564
2024-02-14 11:39:40 +01:00

24 lines
735 B
JavaScript

const path = require('path');
module.exports = {
rootDir: path.join(__dirname, '..', '..'),
testEnvironment: 'jest-environment-jsdom',
testMatch: [
'**/test/unit/*.js?(x)',
'**/test/unit/**/*.js?(x)',
],
setupFiles: ['<rootDir>/test/unit/jest-shim.js'],
setupFilesAfterEnv: ['<rootDir>/test/unit/setup.js'],
testPathIgnorePatterns: [
'<rootDir>/node_modules/',
'<rootDir>/test/build-artifacts/',
'<rootDir>/test/unit/jest-shim.js',
'<rootDir>/test/unit/setup.js',
],
moduleNameMapper: {
'^.+\\.svg$': 'jest-transform-stub'
},
transformIgnorePatterns: ['/node_modules/(?!(sinon|react-syntax-highlighter)/)'],
silent: true, // set to `false` to allow console.* calls to be printed
};