mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-14 16:51:33 +10:00
Fixed Jest errors occurring after latest merge from upstream
This commit is contained in:
@ -2,4 +2,4 @@ const babelOptions = {
|
|||||||
presets: ['babel-preset-gatsby'],
|
presets: ['babel-preset-gatsby'],
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = require('babel-jest').createTransformer(babelOptions);
|
module.exports = require('babel-jest').default.createTransformer(babelOptions);
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
const esModules = ['gatsby', 'nanoevents'].join('|');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
testRegex: '/*.test.js$',
|
testRegex: '/*.test.js$',
|
||||||
collectCoverage: true,
|
collectCoverage: true,
|
||||||
@ -26,11 +28,12 @@ module.exports = {
|
|||||||
'.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': `<rootDir>/__mocks__/file-mock.js`,
|
'.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': `<rootDir>/__mocks__/file-mock.js`,
|
||||||
},
|
},
|
||||||
testPathIgnorePatterns: [`node_modules`, `\\.cache`],
|
testPathIgnorePatterns: [`node_modules`, `\\.cache`],
|
||||||
transformIgnorePatterns: [`node_modules/(?!(gatsby)/)`],
|
transformIgnorePatterns: [`node_modules/(?!${esModules})`],
|
||||||
globals: {
|
globals: {
|
||||||
__PATH_PREFIX__: ``,
|
__PATH_PREFIX__: ``,
|
||||||
},
|
},
|
||||||
testURL: `http://localhost`,
|
testURL: `http://localhost`,
|
||||||
setupFiles: [`<rootDir>/loadershim.js`],
|
setupFiles: [`<rootDir>/loadershim.js`],
|
||||||
setupFilesAfterEnv: [`<rootDir>/jest.setup.js`],
|
setupFilesAfterEnv: [`<rootDir>/jest.setup.js`],
|
||||||
|
testEnvironment: 'jsdom',
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user