2023-09-12 09:56:08 +00:00
|
|
|
'use strict';
|
|
|
|
|
2022-04-18 21:06:41 +00:00
|
|
|
// For a detailed explanation regarding each configuration property, visit:
|
|
|
|
// https://jestjs.io/docs/en/configuration.html
|
2023-11-08 22:06:07 +00:00
|
|
|
|
2022-04-18 21:06:41 +00:00
|
|
|
module.exports = {
|
|
|
|
// Automatically clear mock calls and instances between every test
|
|
|
|
clearMocks: true,
|
2023-11-08 22:06:07 +00:00
|
|
|
|
2022-04-18 21:06:41 +00:00
|
|
|
// Indicates whether the coverage information should be collected while executing the test
|
|
|
|
collectCoverage: true,
|
2023-11-08 22:06:07 +00:00
|
|
|
|
2022-04-18 21:06:41 +00:00
|
|
|
// An array of glob patterns indicating a set of files for
|
|
|
|
// which coverage information should be collected
|
|
|
|
collectCoverageFrom: [
|
2023-11-08 22:06:07 +00:00
|
|
|
'resources/**/*.(js|vue)'
|
2022-04-18 21:06:41 +00:00
|
|
|
],
|
2023-11-08 22:06:07 +00:00
|
|
|
|
2022-04-18 21:06:41 +00:00
|
|
|
// The directory where Jest should output its coverage files
|
|
|
|
coverageDirectory: 'coverage',
|
2023-11-08 22:06:07 +00:00
|
|
|
|
2022-04-18 21:06:41 +00:00
|
|
|
// An array of regexp pattern strings used to skip coverage collection
|
|
|
|
coveragePathIgnorePatterns: [
|
2023-11-08 22:06:07 +00:00
|
|
|
'/node_modules/',
|
|
|
|
// currently covered by QUnit
|
|
|
|
'/resources/ext.relatedArticles.readMore/RelatedPagesGateway.js',
|
|
|
|
// Should not need test coverage. Covered by visual regression testing.
|
|
|
|
'/resources/ext.relatedArticles.readMore.bootstrap/index.js'
|
2022-04-18 21:06:41 +00:00
|
|
|
],
|
2023-11-08 22:06:07 +00:00
|
|
|
|
2022-04-18 21:06:41 +00:00
|
|
|
// An object that configures minimum threshold enforcement for coverage results
|
|
|
|
coverageThreshold: {
|
|
|
|
global: {
|
|
|
|
branches: 100,
|
|
|
|
functions: 100,
|
|
|
|
lines: 100,
|
|
|
|
statements: 100
|
|
|
|
}
|
|
|
|
},
|
2023-11-08 22:06:07 +00:00
|
|
|
|
|
|
|
// A set of global variables that need to be available in all test environments
|
|
|
|
globals: {
|
|
|
|
'vue-jest': {
|
|
|
|
babelConfig: false,
|
|
|
|
hideStyleWarn: true,
|
|
|
|
experimentalCSSCompile: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2022-04-18 21:06:41 +00:00
|
|
|
// An array of file extensions your modules use
|
|
|
|
moduleFileExtensions: [
|
|
|
|
'js',
|
|
|
|
'json'
|
|
|
|
],
|
2023-11-08 22:06:07 +00:00
|
|
|
|
2022-04-18 21:06:41 +00:00
|
|
|
// The paths to modules that run some code to configure or
|
|
|
|
// set up the testing environment before each test
|
|
|
|
setupFiles: [
|
|
|
|
'./jest.setup.js'
|
|
|
|
],
|
|
|
|
testEnvironment: 'jsdom',
|
|
|
|
testRegex: '/tests/jest/.*.test.js$'
|
|
|
|
};
|