Skip to content

Commit

Permalink
Make tests a bit more thorough
Browse files Browse the repository at this point in the history
  • Loading branch information
amsardesai committed May 13, 2024
1 parent 898ce3b commit 48c921c
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions tests/src/rules/dynamic-import-chunkname.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ ruleTester.run('dynamic-import-chunkname', rule, {
},
{
code: `import(
/* webpackMode: 'eager' */
/* webpackMode: "eager" */
'someModule'
)`,
options,
Expand Down Expand Up @@ -997,6 +997,24 @@ ruleTester.run('dynamic-import-chunkname', rule, {
errors: [{
message: eagerModeError,
type: 'CallExpression',
suggestions: [
{
desc: 'Remove webpackChunkName',
output: `import(
/* webpackMode: "eager" */
'someModule'
)`,
},
{
desc: 'Remove webpackMode',
output: `import(
/* webpackChunkName: "someModule" */
'someModule'
)`,
},
],
}],
},
],
Expand Down Expand Up @@ -1317,7 +1335,7 @@ context('TypeScript', () => {
},
{
code: `import(
/* webpackMode: 'eager' */
/* webpackMode: "eager" */
'someModule'
)`,
options,
Expand Down

0 comments on commit 48c921c

Please sign in to comment.