From 0da92c20ea9c60f8739201d011ea66c8507ed020 Mon Sep 17 00:00:00 2001 From: Elliot DeNolf Date: Thu, 30 Jul 2020 09:46:52 -0400 Subject: [PATCH] Add jest debug current file and adjust Jest timeout --- .vscode/launch.json | 25 ++++++++++++++++++++++++- jest.config.js | 1 + 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index f664872aa..9ebbc455c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -18,7 +18,30 @@ }, "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", - "port": 9229 + "port": 9229, + "skipFiles": [ + "/**" + ] + }, + { + "name": "Debug Jest Test - Current File", + "type": "node", + "request": "launch", + "runtimeArgs": [ + "--inspect-brk", + "${workspaceRoot}/node_modules/.bin/jest", + "${fileBasename}", + "--runInBand" + ], + "env": { + "PAYLOAD_CONFIG_PATH": "demo/payload.config.js" + }, + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "port": 9229, + "skipFiles": [ + "/**" + ] }, { "type": "node", diff --git a/jest.config.js b/jest.config.js index ec2ac38a4..b3d0efc35 100644 --- a/jest.config.js +++ b/jest.config.js @@ -3,4 +3,5 @@ module.exports = { testEnvironment: 'node', globalSetup: '/src/tests/globalSetup.js', globalTeardown: '/src/tests/globalTeardown.js', + testTimeout: 15000, };