VsCode - Jest

Card Puncher Data Processing

About

Jest plugin in VsCode.

List

vscode-jest-runner

Run on demand a la Idea (https://github.com/firsttris/vscode-jest-runner)

  • Run Config
"jestrunner.jestPath": "${workspaceFolder}\\node_modules\\jest\\bin\\jest.js",
\\ or
"jestrunner.jestPath": ""C:\Users\gerardnico\AppData\Local\Yarn\Data\global\node_modules\jest\bin\jest.js"",

"jestrunner.configPath": "jest.config.js",
"jestrunner.runOptions": { "args": [ "--runInBand" ] },
  • Keybindings example (from Idea)
[
	{
        "key": "ctrl+shift+f10",
        "command": "extension.runJest"
    }, 
	{
        "key": "ctrl+alt+f9",
        "command": "extension.debugJest"
    }
]

Vscode-jest

Run in two phases:

  • upon starting, it will do a full jest run for all of your tests
  • followed by starting jest in watch mode, which will only run tests that changed.

Command run of the Jest plugin vscode-jest

node_modules\.bin\jest.cmd ^
    --testLocationInResults ^
    --json ^
    --useStderr ^
    --outputFile C:\Users\GERARD~1\AppData\Local\Temp\jest_runner_webcomponent.json ^
    --watch --no-coverage --no-color --reporters default ^
    --reporters C:\Users\gerardnico\.vscode\extensions\orta.vscode-jest-3.1.0\out\reporter.js







Share this page:
Follow us:
Task Runner