Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
chore(eslint-plugin): consistently useit
in tests#10680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -17,16 +17,16 @@ const exampleRule = createRule<['value-a' | 'value-b'], never>({ | ||
name: 'my-example-rule', | ||
}); | ||
it('returns true for valid options', () => { | ||
expect(areOptionsValid(exampleRule, ['value-a'])).toBe(true); | ||
}); | ||
describe('returns false for invalid options', () => { | ||
it('bad enum value', () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. 🤔 I actually like
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I don't really care which one we use as long as it is one, and not two If you can get the others to agree, I'm happy to update I don't think you should end up with both. What you say makes sense but, if anything, suggests you would prefer having There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Oh don't get me wrong, I think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. To be honest, my preference is actually suite/test/assert. But the most consistent thing we can do right now is As a middle ground, id prefer to later move from the now-consistent | ||
expect(areOptionsValid(exampleRule, ['value-c'])).toBe(false); | ||
}); | ||
it('bad type', () => { | ||
expect(areOptionsValid(exampleRule, [true])).toBe(false); | ||
}); | ||
}); |
Uh oh!
There was an error while loading.Please reload this page.