Skip to content

Commit

Permalink
replace flat with concat of spread
Browse files Browse the repository at this point in the history
  • Loading branch information
soryy708 committed Apr 24, 2024
1 parent 996c65d commit a6b26c4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/src/rules/no-cycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,22 +293,22 @@ const cases = {
};

ruleTester.run('no-cycle', rule, {
valid: cases.valid.map((testCase) => [testCase, {
valid: [].concat(...cases.valid.map((testCase) => [testCase, {
...testCase,
code: `${testCase.code} // skipErrorMessagePath=true`,
options: [{
...testCase.options && testCase.options[0] || {},
skipErrorMessagePath: true,
}],
}]).flat(1),
}])),

invalid: cases.invalid.map((testCase) => [testCase, {
invalid: [].concat(...cases.invalid.map((testCase) => [testCase, {
...testCase,
code: `${testCase.code} // skipErrorMessagePath=true`,
options: [{
...testCase.options && testCase.options[0] || {},
skipErrorMessagePath: true,
}],
errors: [error(`Dependency cycle detected.`)],
}]).flat(1),
}])),
});

0 comments on commit a6b26c4

Please sign in to comment.