eslint-plugin-jest
eslint-plugin-jest copied to clipboard
ESLint plugin for Jest
I realised this while doing #1191 and gosh is it a tough one: `prefer-expect-assertions` is currently checking if a function call is `expect.hasAssertions` or `expect.assertions` using non-scoped means: ``` const...
This adds caching to _greatly_ reduce the cost of `parseJestFnCall` - currently most rules now sit around the 300-700ms mark, and this takes them down to about ~30ms (after the...
This issue lists Renovate updates and detected dependencies. Read the [Dependency Dashboard](https://docs.renovatebot.com/key-concepts/dashboard/) docs to learn more.[View this repository on the Mend.io Web Portal](https://developer.mend.io/github/jest-community/eslint-plugin-jest). ## Awaiting Schedule These updates are awaiting...
The new rule `prefer-mock-promise-shorthand` is cool! In trying to use the rule/autofix it looks like it has a bug around subtleties of `mockImplementation` parameters. Here is what the new rule...
@SimenB the OS is included in the cache key, so currently we're only generating a cache for `ubuntu` even though we're running on MacOS & Windows too.
In our test suite nest describe blocks a lot. And sometimes we try to test the same behaviour with different behaviours of the user. And we use reuse the title...
It isn't quite accurate to say that Jest doesn't export anything. It exports the `run` and `runCLI` functions, even though it isn't generally recommended to use them ([yet](https://github.com/facebook/jest/issues/5048#issuecomment-470693540)). This updates...
It would be nice to have a rule (with fixer) enforcing that APIs such as `expect`, `describe`, `it`, `jest`, etc should be imported from `@jest/globals`. If there's interest in this...
When I originally added our extension to `unbound-method`, I wanted to allow people to be able to enable it in shared ESLint configs themed around Jest rather than JavaScript or...
Thanks for the plugin! We're happily using it in multiple TypeScript projects. Though, we recently came across the issue that the `unbound-method` rule also complains if we're passing a method...