@@ -157,6 +157,10 @@ describe('apply function', () => {
157157
158158 const runEmit = ( opts ) =>
159159 run ( opts ) . then ( ( compilation ) => {
160+ if ( opts . skipAssetsTesting ) {
161+ return ;
162+ }
163+
160164 if ( opts . expectedAssetKeys && opts . expectedAssetKeys . length > 0 ) {
161165 expect ( Object . keys ( compilation . assets ) . sort ( ) ) . toEqual (
162166 opts . expectedAssetKeys
@@ -884,7 +888,24 @@ describe('apply function', () => {
884888
885889 it ( 'warns when pattern is empty' , ( done ) => {
886890 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+ ] ,
888909 expectedErrors : [ new Error ( `path "from" cannot be empty string` ) ] ,
889910 patterns : [
890911 {
@@ -964,7 +985,7 @@ describe('apply function', () => {
964985 compiler : new MockCompiler ( {
965986 outputPath : '/' ,
966987 } ) ,
967- expectedAssetKeys : [ ] ,
988+ skipAssetsTesting : true ,
968989 expectedErrors : [
969990 new Error (
970991 'using older versions of webpack-dev-server, devServer.outputPath must be defined to write to absolute paths'
0 commit comments