@@ -157,6 +157,10 @@ describe('apply function', () => {
157
157
158
158
const runEmit = ( opts ) =>
159
159
run ( opts ) . then ( ( compilation ) => {
160
+ if ( opts . skipAssetsTesting ) {
161
+ return ;
162
+ }
163
+
160
164
if ( opts . expectedAssetKeys && opts . expectedAssetKeys . length > 0 ) {
161
165
expect ( Object . keys ( compilation . assets ) . sort ( ) ) . toEqual (
162
166
opts . expectedAssetKeys
@@ -884,7 +888,24 @@ describe('apply function', () => {
884
888
885
889
it ( 'warns when pattern is empty' , ( done ) => {
886
890
runEmit ( {
887
- expectedAssetKeys : [ ] ,
891
+ expectedAssetKeys : [
892
+ '.file.txt' ,
893
+ '[!]/hello.txt' ,
894
+ '[special?directory]/(special-*file).txt' ,
895
+ '[special?directory]/directoryfile.txt' ,
896
+ '[special?directory]/nested/nestedfile.txt' ,
897
+ 'binextension.bin' ,
898
+ 'dir (86)/file.txt' ,
899
+ 'dir (86)/nesteddir/deepnesteddir/deepnesteddir.txt' ,
900
+ 'dir (86)/nesteddir/nestedfile.txt' ,
901
+ 'directory/.dottedfile' ,
902
+ 'directory/directoryfile.txt' ,
903
+ 'directory/nested/deep-nested/deepnested.txt' ,
904
+ 'directory/nested/nestedfile.txt' ,
905
+ 'file.txt' ,
906
+ 'file.txt.gz' ,
907
+ 'noextension' ,
908
+ ] ,
888
909
expectedErrors : [ new Error ( `path "from" cannot be empty string` ) ] ,
889
910
patterns : [
890
911
{
@@ -964,7 +985,7 @@ describe('apply function', () => {
964
985
compiler : new MockCompiler ( {
965
986
outputPath : '/' ,
966
987
} ) ,
967
- expectedAssetKeys : [ ] ,
988
+ skipAssetsTesting : true ,
968
989
expectedErrors : [
969
990
new Error (
970
991
'using older versions of webpack-dev-server, devServer.outputPath must be defined to write to absolute paths'
0 commit comments