Skip to content

Commit

Permalink
That sweet feeling of even more coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Goldberg committed Feb 24, 2019
1 parent 2b3d6ec commit d8f8f4c
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions packages/eslint-plugin/tests/rules/boolean-literal-compare.test.ts
Expand Up @@ -15,16 +15,17 @@ const ruleTester = new RuleTester({

ruleTester.run('boolean-literal-compare', rule, {
valid: [
`
3 > 4;
4 < 7;
`,
`
3 == 4;
4 === 3;
4 === 7;
7 !== 4;
`,
'3 > 4;',
'4 < 7;',
'3 == 4;',
'4 === 3;',
'7 !== 4;',
'({} === {});',
'({} === 3);',
'(3 !== {});',
'({} > {});',
'({} > 3);',
'(3 > {});',
`
declare const varAny: any;
varAny === 'true';
Expand Down Expand Up @@ -67,7 +68,17 @@ let union: boolean | undefined;
union === true;
`,
`
let union: (boolean | boolean) | undefined;
let union: (boolean | boolean) | undefined;
union === true;
`,
`
let union: (boolean | {}) | undefined;
union === true;
`,
`
let union: (boolean | {}) | false;
union === true;
`,
Expand Down

0 comments on commit d8f8f4c

Please sign in to comment.