Last active
January 17, 2022 05:44
-
-
Save yoonhoGo/7e085774f605b81a77a16a7f0ed4ad56 to your computer and use it in GitHub Desktop.
VS Code launch.json ts-node and mocha
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// IntelliSense를 사용하여 가능한 특성에 대해 알아보세요. | |
// 기존 특성에 대한 설명을 보려면 가리킵니다. | |
// 자세한 내용을 보려면 https://go.microsoft.com/fwlink/?linkid=830387을(를) 방문하세요. | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"name": "vscode-jest-tests", | |
"request": "launch", | |
"args": [ | |
"--runInBand" | |
], | |
"cwd": "${workspaceFolder}", | |
"console": "integratedTerminal", | |
"internalConsoleOptions": "neverOpen", | |
"disableOptimisticBPs": true, | |
"program": "${workspaceFolder}/node_modules/jest/bin/jest" | |
}, | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "프로그램 시작", | |
"runtimeArgs": [ | |
"-r", | |
"ts-node/register" | |
], | |
"args": [ | |
"${workspaceFolder}/src/index.ts" | |
], | |
"envFile": "${workspaceFolder}/.env" | |
}, | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Run mocha", | |
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", | |
"args": [ | |
"-r", "dotenv/config", | |
"--timeout", "0", // 디버깅 시간이 테스트 결과에 영향을 주지 않기 위해서, | |
"--colors", // terminal color와 같은 색으로 출력 | |
"src/**/spec/*.spec.ts" | |
], | |
// 디버그 실행 시 DEBUG CONSOLE 오픈 | |
"internalConsoleOptions": "openOnSessionStart", | |
// 디버그 실행 시 TERMINAL에서 실행 | |
"console": "integratedTerminal", | |
// "internalConsoleOptions": "neverOpen" | |
}, | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Mocha Current File", | |
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", | |
"args": [ | |
"-r", "dotenv/config", | |
"--timeout", "0", | |
"--colors", | |
"${file}" | |
], | |
"console": "integratedTerminal", | |
"internalConsoleOptions": "neverOpen" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
참고