Add config for vscode-jest extension
Summary: Provides a much nicer devx, shows test pass / failure in the editor and error messages in line https://pxl.cl/25G0x When the extension is installed with this config it will watch all test and run what is needed, automatically updating the editor with test status It also supports debugging tests individually right in the editor see https://github.com/jest-community/vscode-jest for full docs Also Once VS code @ fb is updated to a newer base of vscode, we will get access to to the testing sidebar feature https://pxl.cl/25G0R Reviewed By: lblasa, aigoncharov Differential Revision: D37009812 fbshipit-source-id: e1918a0817d4703089b6300840fcf9564b871682
This commit is contained in:
committed by
Facebook GitHub Bot
parent
23f7e2bdee
commit
1b02f105dc
14
desktop/.vscode/launch.json
vendored
14
desktop/.vscode/launch.json
vendored
@@ -46,6 +46,20 @@
|
|||||||
"protocol": "inspector",
|
"protocol": "inspector",
|
||||||
"internalConsoleOptions": "openOnSessionStart",
|
"internalConsoleOptions": "openOnSessionStart",
|
||||||
"runtimeArgs": ["--require", "ts-node/register"]
|
"runtimeArgs": ["--require", "ts-node/register"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "node",
|
||||||
|
"name": "vscode-jest-tests",
|
||||||
|
"request": "launch",
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"internalConsoleOptions": "neverOpen",
|
||||||
|
"disableOptimisticBPs": true,
|
||||||
|
"program": "${workspaceFolder}/node_modules/.bin/jest",
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"args": ["--config", "jest.config.js", "--runInBand", "--watchAll=false"],
|
||||||
|
"env": {
|
||||||
|
"TZ": "Pacific/Pohnpei"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"compounds": [
|
"compounds": [
|
||||||
|
|||||||
7
desktop/.vscode/settings.json
vendored
7
desktop/.vscode/settings.json
vendored
@@ -32,5 +32,10 @@
|
|||||||
"jest.runAllTestsFirst": false,
|
"jest.runAllTestsFirst": false,
|
||||||
"jest.pathToConfig": "jest.config.js",
|
"jest.pathToConfig": "jest.config.js",
|
||||||
"jest.pathToJest": "node_modules/.bin/jest",
|
"jest.pathToJest": "node_modules/.bin/jest",
|
||||||
"typescript.tsdk": "node_modules/typescript/lib"
|
"typescript.tsdk": "node_modules/typescript/lib",
|
||||||
|
"jest.jestCommandLine": "export TZ=Pacific/Pohnpei; node_modules/.bin/jest --config jest.config.js",
|
||||||
|
"jest.autoRun": {
|
||||||
|
"watch": true,
|
||||||
|
"onStartup": ["all-tests"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user