Last active
October 21, 2022 16:14
-
-
Save mthadley/e5389f45b4fb951be067fe42357d679d to your computer and use it in GitHub Desktop.
A configuration for using vim-projectionist with jest. I was looking for this but couldn't find it anywhere.
This file contains 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
{ | |
"**/__tests__/*.js": { | |
"alternate": "{}.js", | |
"type": "test" | |
}, | |
"*.js": { | |
"alternate": "{dirname}/__tests__/{basename}.js", | |
"type": "source" | |
} | |
} |
For my React Typescript code, where the convention was that tests were in a __tests__
folder and named X.test.tsx
, I used the following
{
"**/__tests__/*.test.tsx": {
"alternate": "{}.tsx",
"type": "test"
},
"*.tsx": {
"alternate": "{dirname}/__tests__/{basename}.test.tsx",
"type": "source"
}
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
File extension must be 'json'