@@ -6,6 +6,7 @@ const isLocalEnv = fs.existsSync(path.join(__dirname, '.local'));
66// https://jestjs.io/docs/en/configuration.html
77
88module . exports = {
9+ rootDir : path . join ( __dirname , '..' ) ,
910 // All imported modules in your tests should be mocked automatically
1011 // automock: false,
1112
@@ -25,7 +26,7 @@ module.exports = {
2526 // collectCoverage: false,
2627
2728 // An array of glob patterns indicating a set of files for which coverage information should be collected
28- collectCoverageFrom : [ '.. /src/**/*.js' ] ,
29+ collectCoverageFrom : [ '<rootDir> /src/**/*.js' ] ,
2930
3031 // The directory where Jest should output its coverage files
3132 // coverageDirectory: null,
@@ -35,7 +36,7 @@ module.exports = {
3536
3637 // Indicates which provider should be used to instrument code for coverage.
3738 // Allowed values are babel (default) or v8.
38- // coverageProvider: 'babel ',
39+ coverageProvider : 'v8 ' ,
3940
4041 // A list of reporter names that Jest uses when writing coverage reports
4142 // coverageReporters: [
@@ -105,7 +106,9 @@ module.exports = {
105106 // ],
106107
107108 // A map from regular expressions to module names that allow to stub out resources with a single module
108- // moduleNameMapper: {},
109+ moduleNameMapper : {
110+ '^@test/pug-plugin$' : '<rootDir>/src/index.js' ,
111+ } ,
109112
110113 // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
111114 // modulePathIgnorePatterns: [],
0 commit comments