Run and debug your Jest tests with ease from VS Code
A VS Code extension that will help you run and debug Jest tests from your editor. You no longer have to run your entire test suite for that one test you changed 🎉
- Install the extension.
- Open the test file.
- Run tests.
-
You don't see the run/link buttons: If you are not seeing the buttons for running the tests, it could be because the plugin did not recognize the file as a test file. You need to update the test match patterns so that it will be recognized as a test file. See the config options section to see more details.
-
Your Jest is installed differently: There is a config option to specify your Jest path. See the config options.
Option | Description |
---|---|
Jest Config Path | Jest config file path relative to the current workspace (e.g: ./jest.config.js) |
Jest Path | Absolute path to the Jest binary (default: node_modules/.bin/jest) |
Run Test Label | Label for the run test action |
Debug Test Label | Label for the debug test action |
Update Snapshosts Label | Label for update snapshots action |
Custom Snapshot Matchers | Custom snapshot matchers |
Test Match Patterns | Glob patterns to match test files (default: ['/*.{test,spec}.{js,jsx,ts,tsx}', '/tests/*.{js,jsx,ts,tsx}']) |