Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Japa ExtensionNew to Visual Studio Code? Get it now.

Japa Extension

jripouteau

|
656 installs
| (3) | Free
| Sponsor
The VSCode extension for Japa.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🧪 Japa extension for VSCode


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
  • Snippets

Demo

Configuration

  • tests.npmScript: The npm script to run when executing tests. Defaults to test

    i.e if you set it to test:unit, the extension will run npm run test:unit --flags when executing tests

  • tests.enableCodeLens: Show CodeLenses above each test. Defaults to true

  • tests.watchMode: Run tests in watch mode when executed via shortcut/codelens. Defaults to false

  • tests.filePattern: The glob pattern to use when searching for tests. Defaults to **/*.{test,spec}.{ts,js}

  • 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 position
  • ctrl+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 or japa-vscode.runTestFile keybindings

Snippets

All snippets are prefixed with ja:. Give it a try in your editor to see what's available.

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 or Cmd+R on Mac) the VS Code window with your extension to load your changes.
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft