feat: declare jest available if the binary exists in node_modules/.bin #130
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Perhaps a bit controversial, but at my work we have a test utility package which has Jest as a direct dependency. Because of this we do not include Jest as a (dev) dependency in the
package.json
files of our apps/libs. As a result I was unable to use theneotest-jest
plugin successfully.I was thinking that actually in order for Jest to run in a project, the only precondition is that the binary is available in
node_modules/.bin/
, so perhaps it makes more sense to check if that's the case instead of reading thepackage.json
files.This has fixed my issue, but perhaps there are some ramifications of this approach which I hadn't considered yet. If so feel free to close this PR.
If this does seem like a good general improvement, then some additional commits might be in order to remove the code that checks the
package.json
files.