Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Mocha debugging #432

Closed

Conversation

reconstructions
Copy link
Contributor

@reconstructions reconstructions commented Jan 10, 2018

Running the yarn test:debug script in client/package.json fails with this error:

$ yarn test:debug
yarn test:debug v0.25.2
$ yarn run test -- --debug-brk
yarn run v0.25.2
$ NODE_PATH=./app mocha --require babel-core/register --require 
./app/libs/testHelper.js --require ./app/libs/testNullCompiler.js 'app/**/*.spec.@(js|jsx)'
 --debug-brk
(node:90448) [DEP0062] DeprecationWarning: `node --debug` and `node 
--debug-brk` are invalid. Please use `node --inspect` or `node --inspect-brk` instead.
error Command failed with exit code 9.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.

Which is fixed by replacing client/package.json with "test:debug": "yarn run test -- debug”. Using debug is also deprecated but it does work, the suggested inspect syntax fails with the current test script syntax.


This change is Reviewable

@justin808
Copy link
Member

Let's rebase this on top of maaster.

@justin808
Copy link
Member

This isn't right either. We don't need the -- for newer node/yarn and we should document the difference of --inspect, --inspect-brk

@ramrudra
Copy link

@justin808 As there are plans to migrate from mocha to Jest, is this still valid?

@justin808
Copy link
Member

@ramrudra there's a PR I'm about to merge for jest.

@ramrudra
Copy link

@justin808 In that case may be we should mark PRs like this with an appropriate label so devs can contribute to open issues than accidentally spending time on these. Just a suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants