Skip to content

Commit 8b4da2d

Browse files
authored
chore: don't print webpack version for each test (#885)
1 parent 6782028 commit 8b4da2d

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ module.exports = {
55
moduleFileExtensions: ['js', 'json'],
66
testMatch: ['**/test/**/*.test.js'],
77
setupFilesAfterEnv: ['<rootDir>/setupTest.js'],
8+
globalSetup: '<rootDir>/scripts/globalSetup.js',
89
snapshotResolver: './test/helpers/snapshotResolver.js',
910
};

scripts/globalSetup.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
const { version } = require('webpack');
2+
3+
module.exports = () =>
4+
console.log(`\n Running tests for webpack @${version} \n`);

test/helpers/snapshotResolver.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ const webpack = require('webpack');
66
const [webpackVersion] = webpack.version;
77
const snapshotExtension = `.snap.webpack${webpackVersion}`;
88

9-
// eslint-disable-next-line no-console
10-
console.log('Current webpack version:', webpackVersion);
11-
129
module.exports = {
1310
resolveSnapshotPath: (testPath) =>
1411
path.join(

0 commit comments

Comments
 (0)