Skip to content

Commit

Permalink
making test more resilient
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed Feb 11, 2021
1 parent 6ae04be commit 78f0865
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions test/functional.js
Original file line number Diff line number Diff line change
Expand Up @@ -2397,7 +2397,7 @@ module.exports = {
// and be versioned
config.copyFiles({
from: './copy',
to: './[path][name]-[hash].[ext]',
to: './[path][name]-[hash:8].[ext]',
pattern: /\.(css|js)$/,
});

Expand Down Expand Up @@ -2427,21 +2427,20 @@ module.exports = {
});

testSetup.runWebpack(config, (webpackAssert) => {
expect(config.outputPath).to.be.a.directory()
.with.files([
'entrypoints.json',
'runtime.js',
'main.js',
'manifest.json',
webpackAssert.assertDirectoryContents([
'entrypoints.json',
'runtime.js',
'main.js',
'manifest.json',

// 1st rule
'foo-5d76c098640df1edecc7ca66ee62b1ea.css',
'foo-5d76c098640df1edecc7ca66ee62b1ea.js',
// 1st rule
'foo-[hash:8].css',
'foo-[hash:8].js',

// 2nd rule
'foo.json',
'foo.png',
]);
// 2nd rule
'foo.json',
'foo.png',
]);

done();
});
Expand Down

0 comments on commit 78f0865

Please sign in to comment.