Skip to content

Commit

Permalink
test: add additional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfaith committed Jan 17, 2025
1 parent 43c9eea commit 98d6859
Showing 1 changed file with 84 additions and 0 deletions.
84 changes: 84 additions & 0 deletions src/tests/rules/no-redundant-files.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,90 @@ ruleTester.run("no-redundant-files", rule, {
\t\t
]
}
`,
},
],
},
],
},
{
code: `{
"bin": {
"cli": "./dist/cli.js",
},
\t"files": [
\t\tnull,
\t\t"CHANGELOG.md",
\t\t"./dist/cli.js"
]
}
`,
errors: [
{
data: { file: "./dist/cli.js" },
line: 8,
messageId: "unnecessaryBin",
suggestions: [
{
messageId: "remove",
output: `{
"bin": {
"cli": "./dist/cli.js",
},
\t"files": [
\t\tnull,
\t\t"CHANGELOG.md"
\t\t
]
}
`,
},
],
},
],
},
{
code: `{
\t"files": [
\t\tnull,
\t\t"README.md",
\t\t"./package.json"
]
}
`,
errors: [
{
data: { file: "README.md" },
line: 4,
messageId: "unnecessaryDefault",
suggestions: [
{
messageId: "remove",
output: `{
\t"files": [
\t\tnull,
\t\t
\t\t"./package.json"
]
}
`,
},
],
},
{
data: { file: "./package.json" },
line: 5,
messageId: "unnecessaryDefault",
suggestions: [
{
messageId: "remove",
output: `{
\t"files": [
\t\tnull,
\t\t"README.md"
\t\t
]
}
`,
},
],
Expand Down

0 comments on commit 98d6859

Please sign in to comment.