eslint-plugin-testing-library
eslint-plugin-testing-library copied to clipboard
feat(await-async-query,await-async-utils,await-fire-event): support handling promises with `jest-extended`'s `.toResolve` & `.toRejects`
Checks
- [x] I have read the contributing guidelines.
- [x] If some rule is added/updated/removed, I've regenerated the rules list (
npm run generate:rules-list) - [x] If some rule meta info is changed, I've regenerated the plugin shared configs (
npm run generate:configs)
Changes
Add support for marking usage of jest-extendeds toResolve and toReject (docs) as valid handling of promises.
Context
This ESLint plugin is only about @testing-library testing frameworks.
If you want to have linting for jest & jest-extended, you should have a look at eslint-plugin-jest & eslint-plugin-jest-extended
@MichaelDeBoey Can we rethink this? I would say this is a legit update for the rule. Such matchers can't be extended for the rule in eslint-plugin-jest or eslint-plugin-jest-extended. Since the matchers mentioned in this PR belong to jest, and the rule is tied to jest, I would say this is a valid case and should be merged.
Reading the rule README again, I think I misunderstood what @NickBolles was trying to do.
I indeed think this has a place in our plugin! 👍
@MichaelDeBoey Great! I'll review this later.
@Belco90 updated! (with a copy/paste accident in the message for d1cba9c :( )
@NickBolles Could you please also add tests for all these rules?
Good catch, I missed this!
@NickBolles Just a reminder you have some CI checks to fix!
@Belco90 sorry about such the delay on this. I've added tests for await-async-utils and await-fire-event, merged the latest from main and fixed the format issues.
:tada: This PR is included in version 5.9.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
@all-contributors please add @NickBolles for code,test, and doc
:tada: This PR is included in version 6.0.0-alpha.14 :tada:
The release is available on:
Your semantic-release bot :package::rocket: