Skip to content

Commit

Permalink
[Test] add explicit marker for trailing whitespace in cases
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath authored and ljharb committed Sep 2, 2024
1 parent 038c26c commit 8bdb32b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions tests/src/rules/dynamic-import-chunkname.js
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ ruleTester.run('dynamic-import-chunkname', rule, {
{
desc: 'Remove webpackChunkName',
output: `import(
${''}
/* webpackMode: "eager" */
'someModule'
)`,
Expand All @@ -1010,7 +1010,7 @@ ruleTester.run('dynamic-import-chunkname', rule, {
desc: 'Remove webpackMode',
output: `import(
/* webpackChunkName: "someModule" */
${''}
'someModule'
)`,
},
Expand Down
10 changes: 5 additions & 5 deletions tests/src/rules/no-duplicates.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,28 +455,28 @@ import {x,y} from './foo'
import {
BULK_ACTIONS_ENABLED
} from '../constants';
${''}
const TestComponent = () => {
return <div>
</div>;
}
${''}
export default TestComponent;
`,
output: `
import {
DEFAULT_FILTER_KEYS,
BULK_DISABLED,
${''}
BULK_ACTIONS_ENABLED
} from '../constants';
import React from 'react';
${''}
const TestComponent = () => {
return <div>
</div>;
}
${''}
export default TestComponent;
`,
errors: ["'../constants' imported multiple times.", "'../constants' imported multiple times."],
Expand Down
6 changes: 3 additions & 3 deletions tests/src/rules/no-import-module-exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ ruleTester.run('no-import-module-exports', rule, {
import fs from 'fs/promises';
const subscriptions = new Map();
${''}
export default async (client) => {
/**
* loads all modules and their subscriptions
*/
const modules = await fs.readdir('./src/modules');
${''}
await Promise.all(
modules.map(async (moduleName) => {
// Loads the module
Expand All @@ -97,7 +97,7 @@ ruleTester.run('no-import-module-exports', rule, {
}
})
);
${''}
/**
* Setting up all events.
* binds all events inside the subscriptions map to call all functions provided
Expand Down

0 comments on commit 8bdb32b

Please sign in to comment.