Skip to content

Commit

Permalink
✅ Add coverage, again
Browse files Browse the repository at this point in the history
  • Loading branch information
coyotte508 committed Jan 24, 2023
1 parent cb5876e commit 2787762
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions packages/eslint-plugin/tests/rules/key-spacing.test.ts
Expand Up @@ -328,6 +328,21 @@ interface X {
interface X {
a : number;
abc : string
};
`,
options: [
{
align: { on: 'value', beforeColon: true, afterColon: true },
singleLine: { beforeColon: false, afterColon: false },
multiLine: { beforeColon: false, afterColon: false },
},
],
},
{
code: `
interface X {
a : number;
abc : string
};
`,
options: [
Expand Down Expand Up @@ -519,6 +534,22 @@ let x: {
},
{
code: `
let x: {
a: number;
abc: string
};
`,
output: `
let x: {
a: number;
abc: string
};
`,
options: [{ align: { on: 'value' } }],
errors: [{ messageId: 'missingValue' }],
},
{
code: `
let x: {
a: number;
"🌷": "bar", // 2 code points
Expand Down Expand Up @@ -878,6 +909,22 @@ interface X {
};
`,
output: `
interface X {
a : number;
abc: string
};
`,
options: [{ align: { on: 'colon' } }],
errors: [{ messageId: 'extraKey' }],
},
{
code: `
interface X {
a : number;
abc: string
};
`,
output: `
interface X {
a : number;
abc : string
Expand Down

0 comments on commit 2787762

Please sign in to comment.