...
Code Block | ||
---|---|---|
| ||
npm start -- --https --cert cert.pem --key key.pem |
Debug jest test cases
To debug the jest cases, I just used the first option from these instructions: https://jestjs.io/docs/en/troubleshooting
- I added .vscode/launch.json with the following configuration
Code Block | ||||
---|---|---|---|---|
| ||||
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 9229
}
]
} |
- From the command line I just run the following command:
node --inspect-brk node_modules/.bin/jest --runInBand --config jest.config.json
- In VSCode set breakpoints and click Debug
I could not figure out how to automatically launch and attach to a test. These instructions: https://jestjs.io/docs/en/troubleshooting did not work for me.
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...