diff --git a/.vscode/launch.json b/.vscode/launch.json index 1043bfd..d2c9dcb 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,21 +2,35 @@ "version": "0.2.0", "configurations": [ { - "name": "Tests", + "name": "Tests - Current File", "type": "node", "request": "launch", - "program": "${workspaceRoot}/node_modules/jest/bin/jest.js", + "program": "${workspaceFolder}/node_modules/.bin/jest", "sourceMaps": true, - "runtimeArgs": [ - "-i" + "args": [ + "${fileBasenameNoExtension}", + "--config", + "jest.config.js" ], - "env": { - "NODE_ENV": "development" - }, - "outFiles": [ - "${workspaceRoot}/dist/**/*" - ], - "cwd": "${workspaceRoot}" + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "disableOptimisticBPs": true, + "windows": { + "program": "${workspaceFolder}/node_modules/jest/bin/jest", + } + }, + { + "type": "node", + "request": "launch", + "name": "Test - All Files", + "program": "${workspaceFolder}/node_modules/.bin/jest", + "args": ["--runInBand"], + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "disableOptimisticBPs": true, + "windows": { + "program": "${workspaceFolder}/node_modules/jest/bin/jest", + } } ] -} \ No newline at end of file +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json index fd64bef..4f28873 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -21,7 +21,7 @@ { "label": "test", "type": "npm", - "script": "test", + "script": "test:watch", "presentation": { "reveal": "always" }, diff --git a/jest.config.js b/jest.config.js index c795823..9588f85 100644 --- a/jest.config.js +++ b/jest.config.js @@ -4,6 +4,7 @@ const config = { preset: 'ts-jest', rootDir: '.', + testEnvironment: 'node', testMatch: [ '/src/**/?(*.)+(spec|test).ts?(x)', ],