From ec565727640cf71764b6a7864c5998d26954c08f Mon Sep 17 00:00:00 2001 From: Naz Date: Tue, 23 May 2023 12:57:43 +0700 Subject: [PATCH] Added example test launchers for VS Code refs https://github.com/TryGhost/Ghost/commit/97584cf0c42a97eafb0371b7b7798ebb5e4e0179 - We now track launch.json file in source control and it's often useful to be able to debug tests either for separate packages or e2e types of tests inside of Ghost core - These configurations should be useful "templates" for custom launchers one might need when working on specific part of the code --- .vscode/launch.json | 48 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index f9cc458fdc..e66470435f 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -33,6 +33,52 @@ "autoAttachChildProcesses": true, "outputCapture": "std", "console": "integratedTerminal", + }, + { + "args": [ + "--require", + "./test/utils/overrides.js", + "-u", + "bdd", + "--timeout", + "999999", + "--colors", + "./test/e2e-api/**/*.test.js" + ], + "cwd": "${workspaceFolder}/ghost/core", + "internalConsoleOptions": "openOnSessionStart", + "name": "E2E API Tests", + "program": "./node_modules/.bin/_mocha", + "request": "launch", + "skipFiles": [ + "/**" + ], + "env": { + "NODE_ENV": "testing-mysql" + }, + "type": "node" + }, + { + "args": [ + "-u", + "bdd", + "--timeout", + "999999", + "--colors", + "./test/**/*.test.js" + ], + "cwd": "${workspaceFolder}/ghost/email-service/", + "internalConsoleOptions": "openOnSessionStart", + "name": "Email Service Unit Tests", + "program": "./node_modules/.bin/_mocha", + "request": "launch", + "skipFiles": [ + "/**" + ], + "env": { + "NODE_ENV": "testing-mysql" + }, + "type": "node" } ] -} \ No newline at end of file +}