Skip to content

Commit

Permalink
test: add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
chouchouji committed Jan 22, 2025
1 parent e09a739 commit 6e362f6
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/tests/rules/no-empty-fields.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,41 @@ ruleTester.run("no-empty-fields", rule, {
{
code: `{
\t\t"name": "test",
\t\t"config": [ {}, ["test"], [] ]
}
`,
errors: [
{
messageId: "emptyFields",
suggestions: [
{
messageId: "remove",
output: `{
\t\t"name": "test",
\t\t"config": [ ["test"], [] ]
}
`,
},
],
},
{
messageId: "emptyFields",
suggestions: [
{
messageId: "remove",
output: `{
\t\t"name": "test",
\t\t"config": [ {}, ["test"] ]
}
`,
},
],
},
],
},
{
code: `{
\t\t"name": "test",
\t\t"dependencies": {}
}
`,
Expand Down

0 comments on commit 6e362f6

Please sign in to comment.