feat: rename await-fire-event to await-async-event and support user-event#652
feat: rename await-fire-event to await-async-event and support user-event#652Belco90 merged 1 commit intotesting-library:alphafrom skovy:pr/await-async-event
await-fire-event to await-async-event and support user-event#652Conversation
Belco90
left a comment
There was a problem hiding this comment.
Thanks for taking care of this! I left some comments.
lib/rules/await-fire-event.ts
Outdated
| } from '../node-utils'; | ||
|
|
||
| export const RULE_NAME = 'await-fire-event'; | ||
| const EVENT_MODULES = ['fireEvent', 'userEvent'] as const; |
There was a problem hiding this comment.
We have EVENTS_SIMULATORS exported in utils. Any problem with reusing that one?
lib/rules/await-fire-event.ts
Outdated
| additionalProperties: false, | ||
| properties: { | ||
| eventModule: { | ||
| type: 'string', |
There was a problem hiding this comment.
Sorry, I think I didn't specify this really well in the original ticket. The idea is that this is a list accepting either "fire-event", "user-event", or both!
Frameworks like Vue Testing Library will need to report both, so they'll need to set this option to ["fire-event", "user-event"].
By default, it should be just ["user-event"]
It should be fairly easy to adapt your current code tho.
|
Thanks for the feedback, I'll take a look at those comments! Forgot about draft PRs, thanks for updating that too 🤦♂️ |
await-fire-event to await-async-event and support user-event
Belco90
left a comment
There was a problem hiding this comment.
Last request! Can you add some tests without setting the option so it takes the default value? This way we explicitly test the default options. Duplicating existing tests just without the option property is fine.
BREAKING CHANGE: rename await-fire-event to await-async-event and add support for user-event
|
🎉 This PR is included in version 6.0.0-alpha.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
…or `user-event` (#652) BREAKING CHANGE: `await-fire-event` is now called `await-async-event`
BREAKING CHANGE: rename
await-fire-eventtoawait-async-eventand supportuser-eventChecks
npm run generate:rules-list)npm run generate:configs)Changes
await-fire-eventrule to become theawait-async-eventruleuserEventfor most, butfireEventfor those that have async fire event methodsContext
Resolves #626