-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Debug Tests in Visual Studio Code #46
Comments
did you find a way to do this? |
No , all of them were failed attempts. 😔 |
Hi @gbatterbee , do you find any solution for this? |
For the moment, I have stopped looking and stuck with es6.
When I get some spare time I'll take a look. Think I need to go through the detail of webpack.
Also might take a look at using create react app with ES6. But then code in typescript and use a task to compile it down to ES5.
… On 10 Sep 2017, at 12:59, Vikas Kumar ***@***.***> wrote:
Hi @gbatterbee , do you find any solution for this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
The other thought is to write the tests in js.
But not sure how to configure.
…Sent from my iPad
On 10 Sep 2017, at 12:59, Vikas Kumar ***@***.***> wrote:
Hi @gbatterbee , do you find any solution for this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@gbatterbee Are you able to run debug test on simple CRA app? |
Yeah, debugging with es6 works.
Can't remember what I did.
Had problems with the jests not auto marking.
Other priorities have come up.
Had to shelve this for a bit.
Don't think this is what I did, but there are some docs here
https://facebook.github.io/jest/docs/en/troubleshooting.html
I did something different, that may account for why the jest mocking wasn't working.
Would be interested to hear if you get all working.
…Sent from my iPhone
On 10 Sep 2017, at 22:00, Vikas Kumar ***@***.***> wrote:
@gbatterbee Are you able to run debug test on simple CRA app?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
nope this doesn't work for me :( |
this config start the debugger and ran the test but never hit the breakpoint |
Will take a look at my code over the weekend. Definitely got my break points bring hit.
Shouldn't be this difficult, should it. Pretty fundamental requirement
…Sent from my iPhone
On 10 Sep 2017, at 23:44, Vikas Kumar ***@***.***> wrote:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug CRA Tests",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/react-scripts",
"runtimeArgs": [
"--inspect-brk",
"test"
],
"args": [
"--runInBand",
"--no-cache",
"--env=jsdom"
],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
]
}
this config start the debugger and ran the test but never hit the breakpoint
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Thanks @gbatterbee |
Version Test suite failed to run
{
"messageText": "Cannot read file 'C:\\[project]\\tsconfig.test.json': ENOENT: no such file or directory, open 'C:\\[project]\\tsconfig.test.json'.",
"category": 1,
"code": 5012
} To fix this, create a new file in the root of the project called |
This makes me a very happy person :D |
Moving {
"version": "0.2.0",
"configurations": [
{
"name": "Debug CRA Tests",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/react-scripts-ts",
"args": [
"test",
"--runInBand",
"--no-cache",
"--env=jsdom"
],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
]
} |
Is there a way to debug tests in vs code?
The text was updated successfully, but these errors were encountered: