Link Search Menu Expand Document

Test Runner Settings

Javascript

The test runner is configured via 2 means: throught VSCode and with config files.

VSCode settings

Open your VSCode settings File > Preferences > Settings or CTRL + , (Windows and Linux) or CMD + , (Macos). Then search for “Ponicode”.

⚠️ Please make sure to select workspace tab and not user one.

Inside you can configure how the test runner handles typescript files throught the vscode settings.

There is 3 available values:

  • Use .js file if exists and up to date: The test runner will try to run the compiled js file. If it is missing or outdated, the test runner will use the source .ts file.
  • Only use .ts file: The test runner will only run your .ts file.
  • Only use .js file: The test runner will only run your .js file.

Config files

The test runners reads configuration from several config files.

1 - The Jest config file

The test runners will search for your jest config starting from the configured test location, walking the file system tree upward. It will use the first jest.config.js, jest.config.ts or package.json found.

The test runner will use the moduleNameMapper specified in this config to run your tests.

2 - The Babel config file

The test runner will also search for babel.config.json in a similar fashion. If the babel config is found, the test runner will use babel with the provided configuration to run load your files.

You can find more information about babel here

Python

The Ponicode Python test runner uses the Python interpreter configured in the settings of the Official Python Extension. Ensure that you have configured your Python runner. The minimum required version is 3.6.

> Test Location