JS AutotestRunning 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. Add to VSCode: https://marketplace.visualstudio.com/items?itemName=SirPedr.js-autotest Table of ContentsFeaturesSupported filesJS Autotest has built-in support for JS, TS, JSX and TSX files. Supported test runnersAt 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 filesYou 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 groupRight-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 groupRight-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 groupOpen the command palette ( This command follows the same terminal rules explained in RequirementsIn order to use this extension you need VSCode 1.73.0 or above. Extension SettingsThis extension contributes the following settings:
|