@@ -48,56 +48,33 @@ exports.assertStdout = assertStream('stdout');
48
48
49
49
exports . assertStderr = assertStream ( 'stderr' ) ;
50
50
51
- exports . assertSilence = sequence (
52
- exports . assertStdout ( 'console' ) ( 0 ) `resolve-url-loader:` ,
53
- exports . assertStderr ( 'node deprecation warning' ) ( 0 ) `\[DEP_RESOLVE_URL_LOADER[A-Z_]+\]`
54
- ) ;
55
-
56
- // TODO v5 - assertNoMessages becomes the same as assertSilence when we remove rework engine
57
51
exports . assertNoMessages = sequence (
58
52
exports . assertStdout ( 'console' ) ( 0 ) `resolve-url-loader:` ,
59
- onlyMeta ( 'meta.engine == "rework"' ) (
60
- exports . assertStderr ( 'node deprecation warning' ) ( 1 ) `\[DEP_RESOLVE_URL_LOADER[A-Z_]+\]`
61
- ) ,
62
- onlyMeta ( 'meta.engine == "postcss"' ) (
63
- exports . assertStderr ( 'node deprecation warning' ) ( 0 ) `\[DEP_RESOLVE_URL_LOADER[A-Z_]+\]`
64
- )
53
+ exports . assertStderr ( 'node deprecation warning' ) ( 0 ) `\[DEP_RESOLVE_URL_LOADER[A-Z_]+\]`
65
54
) ;
66
55
67
- const assertDeprecationWarning = ( message = '' ) => exports . assertStderr ( 'node deprecation warning' ) ( 1 ) `
56
+ exports . assertDeprecationWarning = ( message = '' ) => exports . assertStderr ( 'node deprecation warning' ) ( 1 ) `
68
57
^[^\n]*\[DEP_RESOLVE_URL_LOADER[A-Z_]+\][ ]DeprecationWarning:[ ]${ message }
69
58
` ;
70
- // TODO v5 - this becomes the same as the internal method when we remove rework engine
71
- exports . assertDeprecationWarning = ( message ) => sequence (
72
- onlyMeta ( 'meta.engine == "rework"' ) (
73
- assertDeprecationWarning (
74
- 'the "engine" option is deprecated, "postcss" engine is the default, using "rework" engine is not advised'
75
- )
76
- ) ,
77
- assertDeprecationWarning ( message )
78
- ) ;
79
-
80
- const assertMisconfigWarningWithMessage = ( message ) => exports . assertStdout ( 'webpack warning' ) ( 1 ) `
81
- ^[ ]*WARNING[^\n]*
82
- ([^\n]+\n){0,2}[^\n]*resolve-url-loader:[ ]*loader misconfiguration
83
- [ ]+${ message }
84
- ` ;
85
-
86
- const assertChildCompilationWarning = exports . assertStdout ( 'webpack warning' ) ( 1 ) `
87
- 1 WARNING in child compilations
88
- ` ;
89
59
90
60
exports . assertMisconfigWarning = ( message ) => sequence (
91
- onlyMeta ( 'meta.version.webpack == 4' ) ( assertMisconfigWarningWithMessage ( message ) ) ,
92
- onlyMeta ( 'meta.version.webpack >= 5' ) ( assertChildCompilationWarning )
61
+ onlyMeta ( 'meta.version.webpack == 4' ) (
62
+ exports . assertStdout ( 'webpack warning' ) ( 1 ) `
63
+ ^[ ]*WARNING[^\n]*
64
+ ([^\n]+\n){0,2}[^\n]*resolve-url-loader:[ ]*loader misconfiguration
65
+ [ ]+${ message }
66
+ `
67
+ ) ,
68
+ onlyMeta ( 'meta.version.webpack >= 5' ) (
69
+ exports . assertStdout ( 'webpack warning' ) ( 1 ) `
70
+ 1 WARNING in child compilations
71
+ `
72
+ )
93
73
) ;
94
74
95
- const assertCantResolveError = exports . assertStdout ( 'webpack "Can\'t resolve" error' ) ( 1 ) `
75
+ exports . assertAssetError = exports . assertStdout ( 'webpack "Can\'t resolve" error' ) ( 1 ) `
96
76
^[ ]*ERROR[^\n]*
97
77
[ ]*Module build failed[^\n]*
98
78
[ ]*ModuleBuildError: Module build failed[^\n]*
99
79
[ ]*Error: Can't resolve[^\n]*
100
80
` ;
101
-
102
- // TODO inline this
103
- exports . assertAssetError = assertCantResolveError ;
0 commit comments