Running tests for your files made easy. This extension allows you to run your test command on one or more files with only 2 clicks, without having to copy the file paths every time or running all your tests at once.
Table of Contents
JS Autotest has built-in support for JS, TS, JSX and TSX files.
Supported test runners
At this time, JSAutotest supports Jest.
Running test command for a file
Right-click any of the supported files, then select the option Run tests for this file. Autotest will then run your test script passing the file path as an argument to that script.
Be aware that JSAutotest will create a new terminal named 'Autotest' to run the command. If a terminal with the same name already, exists, JSAutotest will use it instead.
Running test command for multiple files
You can run tests for multiple files at once adding them to what we call a 'test group'. A test group is a list of paths to your test files.
Adding a file to the test group
Right-click any of the supported files then select the option Add to test group. You should receive a success message if the operation ran without errors. Note that you can't add the same file to the test group more than once.
Removing a file from the test group
Right-click any of the supported files then select the option Remove from test group. If the file was in the test group, it will be removed and you should see a confirmation message.
Running all tests for files in the test group
Open the command palette (
This command follows the same terminal rules explained in
In order to use this extension you need VSCode 1.73.0 or above.
This extension contributes the following settings: