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 54aed3b
Showing 1 changed file with 48 additions and 1 deletion.
49 changes: 48 additions & 1 deletion packages/eslint-plugin/tests/rules/key-spacing.test.ts
Expand Up @@ -332,8 +332,23 @@ interface X {
`,
options: [
{
align: { on: 'value', beforeColon: true, afterColon: true },
singleLine: { beforeColon: false, afterColon: false },
multiLine: { beforeColon: true, afterColon: true, align: 'value' },
multiLine: { beforeColon: false, afterColon: false },
},
],
},
{
code: `
interface X {
a : number;
abc : string
};
`,
options: [
{
singleLine: { beforeColon: false, afterColon: false },
multiLine: { beforeColon: false, afterColon: false, align: 'value' },
},
],
},
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 54aed3b

Please sign in to comment.