Skip to content

Commit

Permalink
remove the engine option harder, ensure deprecation warning is tested
Browse files Browse the repository at this point in the history
  • Loading branch information
bholloway committed Jun 9, 2021
1 parent 08e153c commit fb09fae
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/resolve-url-loader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const logToTestHarness = require('./lib/log-to-test-harness');
const DEPRECATED_OPTIONS = {
engine: [
'DEP_RESOLVE_URL_LOADER_OPTION_ENGINE',
'the "engine" option has been removed, "postcss" is the only available parser'
'"engine" option has been removed, postcss is the only parser used'
],
keepQuery: [
'DEP_RESOLVE_URL_LOADER_OPTION_KEEP_QUERY',
Expand Down
30 changes: 30 additions & 0 deletions test/cases/misconfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,36 @@ module.exports = test(
env({
ENTRY: join('src', 'index.scss')
}),
testWithOption({ engine: 'postcss' })(
testDefault(
buildDevNormal(
assertWebpackOk,
assertNoErrors,
assertDeprecationWarning('"engine" option has been removed'),
assertContentDev
),
buildProdNormal(
assertWebpackOk,
assertNoErrors,
assertDeprecationWarning('"engine" option has been removed'),
assertContentProd
)
),
testSilent(
buildDevNormal(
assertWebpackOk,
assertNoErrors,
assertSilence,
assertContentDev
),
buildProdNormal(
assertWebpackOk,
assertNoErrors,
assertSilence,
assertContentProd
)
)
),
testWithOption({ attempts: 1 })(
testDefault(
buildDevNormal(
Expand Down

0 comments on commit fb09fae

Please sign in to comment.