refactor: Use npx jest as default jest_cmd#7
Open
SirWrexes wants to merge 3 commits into
Open
Conversation
Author
|
Woops, it seems my formatter aggressively shifted all indentation there. |
+ Slightly better start perf: No need to climb the directory tree + More flexible: Can run Jest outside of projects + Jest users (should) always have NPM installed, and as such, have `npx` available.
This patch allows users to set `jest_cmd` via the global `g:jest_cmd`. Useful for [per-project configuration](https://github.com/windwp/nvim-projectconfig). The global variable `g:jest_cmd` will **always** have precedence over plugin configuration.
Author
|
I've got this use-case where I'm using I'm using nvim-projectconfig and have a simple lua file for my project containing |
Remove unnecessary dependency Jest (all that's really needed is `npm`). Update comment about `jest_cmd` to accomodate new features.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
npxavailable.*A temporary install through
npxstill requires a config file present somewhere in the current working directory or above in the tree.A default config file could fix that, but I think it should be the user's choice to set it up or not.
However, it would be nice to have an option to set the path to a global config file, and maybe recycle the old tree-climbing functions to find a local config, and then use the default if none is found... But then that wouldn't work with Jest configs from inside
package.json. 😕