Skip to content

Commit fb09fae

Browse files
committed
remove the engine option harder, ensure deprecation warning is tested
1 parent 08e153c commit fb09fae

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

packages/resolve-url-loader/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const logToTestHarness = require('./lib/log-to-test-harness');
2020
const DEPRECATED_OPTIONS = {
2121
engine: [
2222
'DEP_RESOLVE_URL_LOADER_OPTION_ENGINE',
23-
'the "engine" option has been removed, "postcss" is the only available parser'
23+
'"engine" option has been removed, postcss is the only parser used'
2424
],
2525
keepQuery: [
2626
'DEP_RESOLVE_URL_LOADER_OPTION_KEEP_QUERY',

test/cases/misconfiguration.js

+30
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,36 @@ module.exports = test(
5353
env({
5454
ENTRY: join('src', 'index.scss')
5555
}),
56+
testWithOption({ engine: 'postcss' })(
57+
testDefault(
58+
buildDevNormal(
59+
assertWebpackOk,
60+
assertNoErrors,
61+
assertDeprecationWarning('"engine" option has been removed'),
62+
assertContentDev
63+
),
64+
buildProdNormal(
65+
assertWebpackOk,
66+
assertNoErrors,
67+
assertDeprecationWarning('"engine" option has been removed'),
68+
assertContentProd
69+
)
70+
),
71+
testSilent(
72+
buildDevNormal(
73+
assertWebpackOk,
74+
assertNoErrors,
75+
assertSilence,
76+
assertContentDev
77+
),
78+
buildProdNormal(
79+
assertWebpackOk,
80+
assertNoErrors,
81+
assertSilence,
82+
assertContentProd
83+
)
84+
)
85+
),
5686
testWithOption({ attempts: 1 })(
5787
testDefault(
5888
buildDevNormal(

0 commit comments

Comments
 (0)