Skip to content

Commit

Permalink
chore: added two more test
Browse files Browse the repository at this point in the history
  • Loading branch information
anikethsaha committed Apr 10, 2020
1 parent da46af2 commit 07950f6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/eslint-plugin/tests/rules/init-declarations.test.ts
Expand Up @@ -312,6 +312,10 @@ interface IEmployee {
`,
options: ['never'],
},
{
code: 'declare const foo: number = "asd";',
options: ['always'],
},
],
invalid: [
// checking compatibility with base rule
Expand Down Expand Up @@ -654,5 +658,16 @@ const class1 = class NAME {
},
],
},
{
code: 'declare var foo: number = "asd";',
options: ['never'],
errors: [
{
messageId: 'notInitialized',
data: { idName: 'foo' },
type: AST_NODE_TYPES.VariableDeclarator,
},
],
},
],
});

0 comments on commit 07950f6

Please sign in to comment.