0

I am writing some unit tests for react using jest and it fails at one point. I want to debug the unit tests and I try the following

https://facebook.github.io/jest/docs/troubleshooting.html

However on the first run itself

node --debug-brk ./node_modules/.bin/jest --runInBand

I get the following error

node_modules\.bin\jest:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^
SyntaxError: missing ) after argument list

Any ideas anyone?

2 Answers 2

1

Instead of this:

node --debug-brk ./node_modules/.bin/jest --runInBand

try this:

node --debug-brk ./node_modules/jest/bin/jest.js --runInBand

(or)

node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand

Sign up to request clarification or add additional context in comments.

Comments

0

It looks like "$0" should be '$0'

1 Comment

This is something generated by the library I cannot change this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.