From caa04847acb54b19510b67610519d164f482eef6 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Tue, 30 Oct 2018 12:34:53 -0300 Subject: [PATCH] add support for debugging jest tests in vscode --- .vscode/launch.json | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000000..d35e3e6557a --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,46 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Jest All", + "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", + "program": "${workspaceFolder}/node_modules/jest/bin/jest", + "args": [ + "--silent", + "--config", + "${workspaceFolder}/jest.config.js" + ], + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "env":{ + "ELECTRON_RUN_AS_NODE": "1" + }, + "windows": { + "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd" + }, + }, + { + "type": "node", + "request": "launch", + "name": "Jest Current", + "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", + "program": "${workspaceFolder}/node_modules/jest/bin/jest", + "args": [ + "--silent", + "--config", + "${workspaceFolder}/jest.config.js", + "${relativeFile}" + ], + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "env":{ + "ELECTRON_RUN_AS_NODE": "1" + }, + "windows": { + "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd" + }, + }, + ] +} \ No newline at end of file