@zohodesk/unit-testing-framework 0.0.15-experimental → 0.0.17-experimental
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -31,9 +31,9 @@ function getDefaultConfig(projectRoot) {
|
|
|
31
31
|
// __tests__ folders can be nested anywhere under the project,
|
|
32
32
|
// so we root Jest at the project itself and rely on testMatch
|
|
33
33
|
// to locate **/__tests__/**/* files at any depth.
|
|
34
|
-
|
|
34
|
+
rootDir: process.cwd(),
|
|
35
35
|
testMatch: ['**/__tests__/**/*.test.js'],
|
|
36
|
-
testPathIgnorePatterns: ['/node_modules/', '/build/'],
|
|
36
|
+
testPathIgnorePatterns: ['/node_modules/', '/build/', '/uat/'],
|
|
37
37
|
// --------------- Environment ---------------
|
|
38
38
|
testEnvironment: 'jsdom',
|
|
39
39
|
// --------------- Transform ---------------
|
|
@@ -74,13 +74,12 @@ function getDefaultConfig(projectRoot) {
|
|
|
74
74
|
// Injects `jest` into globalThis so ESM test files don't need
|
|
75
75
|
// `import { jest } from '@jest/globals'` manually.
|
|
76
76
|
setupFiles: [_path.default.resolve(__dirname, '..', 'environment', 'globals-inject.js')],
|
|
77
|
-
// --------------- Global Setup / Teardown ---------------
|
|
78
|
-
globalSetup: _path.default.resolve(__dirname, '..', 'environment', 'setup.js'),
|
|
79
|
-
globalTeardown: _path.default.resolve(__dirname, '..', 'environment', 'teardown.js'),
|
|
80
77
|
// --------------- Module Resolution ---------------
|
|
81
78
|
moduleFileExtensions: ['js', 'mjs', 'ts', 'json', 'node'],
|
|
82
79
|
// --------------- Misc ---------------
|
|
83
80
|
verbose: true,
|
|
84
|
-
passWithNoTests: true
|
|
81
|
+
passWithNoTests: true,
|
|
82
|
+
clearMocks: true,
|
|
83
|
+
resetMocks: false
|
|
85
84
|
};
|
|
86
85
|
}
|
|
@@ -40,9 +40,9 @@ function getCoverageDefaults(projectRoot) {
|
|
|
40
40
|
return {
|
|
41
41
|
collectCoverage: false,
|
|
42
42
|
coverageDirectory: _path.default.resolve(projectRoot, 'coverage'),
|
|
43
|
-
coverageReporters: ['text', 'text-summary', 'lcov', '
|
|
44
|
-
coveragePathIgnorePatterns: ['/node_modules/', '/__tests__/', '/
|
|
45
|
-
collectCoverageFrom: ['src/**/*.
|
|
43
|
+
coverageReporters: ['text', 'text-summary', 'lcov', 'html', 'json-summary'],
|
|
44
|
+
coveragePathIgnorePatterns: ['/node_modules/', '/__tests__/', '/build/'],
|
|
45
|
+
collectCoverageFrom: ['src/**/*.js'],
|
|
46
46
|
coverageProvider: 'babel',
|
|
47
47
|
coverageThreshold: null
|
|
48
48
|
};
|