Features
- Run tests without typing anything. Either with a shortcut, or via Code Lenses
- Support multiple workspaces
- Support Javascript, Typescript, ESM, CJS
- Works with Adonis.js projects using Japa
Demo
Configuration
-
tests.npmScript
: The npm script to run when executing tests. Defaults totest
i.e if you set it to
test:unit
, the extension will runnpm run test:unit --flags
when executing tests -
tests.enableCodeLens
: Show CodeLenses above each test. Defaults totrue
-
tests.watchMode
: Run tests in watch mode when executed via shortcut/codelens. Defaults tofalse
-
misc.useUnixCd
: Use Unix-style cd for windows terminals ( Useful when using Cygwin or Git Bash )
Keybindings
ctrl+shift+t
: Run the test at the cursor positionctrl+shift+f
: Run the test file in the active editor
These keybindings can be easily changed in your VSCode configuration :
- F1 -> Preferences: Open Keyboard Shortcuts
- Type
japa-vscode
in the search bar - Change the
japa-vscode.runTest
orjapa-vscode.runTestFile
keybindings
Contributing
- See contributing guide
- Clone the project and open it in VS Code
- Run
npm install
- Press
F5
to open a new VSCode window with your extension loaded. - You can relaunch the extension from the debug toolbar after changing code in
src/index.ts
. - You can also reload (
Ctrl+R
orCmd+R
on Mac) the VS Code window with your extension to load your changes.