diff --git a/jest.config.js b/jest.config.js index b6f7c3cf0..9dd5fb46f 100644 --- a/jest.config.js +++ b/jest.config.js @@ -5,5 +5,6 @@ module.exports = { moduleFileExtensions: ['js', 'json'], testMatch: ['**/test/**/*.test.js'], setupFilesAfterEnv: ['/setupTest.js'], + globalSetup: '/scripts/globalSetup.js', snapshotResolver: './test/helpers/snapshotResolver.js', }; diff --git a/scripts/globalSetup.js b/scripts/globalSetup.js new file mode 100644 index 000000000..92d141134 --- /dev/null +++ b/scripts/globalSetup.js @@ -0,0 +1,4 @@ +const { version } = require('webpack'); + +module.exports = () => + console.log(`\n Running tests for webpack @${version} \n`); diff --git a/test/helpers/snapshotResolver.js b/test/helpers/snapshotResolver.js index 742ee5b60..c5800fccc 100644 --- a/test/helpers/snapshotResolver.js +++ b/test/helpers/snapshotResolver.js @@ -6,9 +6,6 @@ const webpack = require('webpack'); const [webpackVersion] = webpack.version; const snapshotExtension = `.snap.webpack${webpackVersion}`; -// eslint-disable-next-line no-console -console.log('Current webpack version:', webpackVersion); - module.exports = { resolveSnapshotPath: (testPath) => path.join(