Created an app using ( https://github.com/Microsoft/TypeScript-React-Starter )
npm install -g create-react-app
create-react-app my-app --scripts-version=react-scripts-ts
I've gone through a number of articles, seem to be going around in circles, but have not yet found how i can debug the default app.test.tsx
Node is on version 7.9.0 Everything else should be on the latest version.
This has been fixed now. https://github.com/Microsoft/TypeScript-React-Starter/issues/46
Install Node v8.5
Update to the latest version of Create-React-App (or update the react-scripts-ts to 2.7)
Configure vscode debugger with
{ "version": "0.2.0", "configurations": [ { "name": "Debug CRA Tests", "type": "node", "request": "launch", "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/react-scripts-ts", "runtimeArgs": [ "--inspect-brk", "test" ], "args": [ "--runInBand", "--no-cache", "--env=jsdom" ], "cwd": "${workspaceRoot}", "protocol": "inspector", "console": "integratedTerminal", "internalConsoleOptions": "neverOpen" } ] }
<!-- begin snippet: js hide: false console: true babel: false -->
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.