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

jest -o crashes #47

Closed
ide opened this issue May 21, 2014 · 9 comments
Closed

jest -o crashes #47

ide opened this issue May 21, 2014 · 9 comments

Comments

@ide
Copy link
Contributor

ide commented May 21, 2014

$ jest -o
Using Jest CLI v0.1.11
Looking for changed files...

/usr/local/lib/node_modules/jest-cli/node_modules/q/q.js:126
                    throw e;
                          ^
Error: Please run node with the --harmony flag!
  at new Loader (/usr/local/lib/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:131:13)
  at /usr/local/lib/node_modules/jest-cli/src/TestRunner.js:100:12
  at _fulfilled (/usr/local/lib/node_modules/jest-cli/node_modules/q/q.js:798:54)
  at self.promiseDispatch.done (/usr/local/lib/node_modules/jest-cli/node_modules/q/q.js:827:30)
  at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/jest-cli/node_modules/q/q.js:760:13)
  at /usr/local/lib/node_modules/jest-cli/node_modules/q/q.js:574:44
  at flush (/usr/local/lib/node_modules/jest-cli/node_modules/q/q.js:108:17)
  at process._tickCallback (node.js:419:13)

I think that line might blame to me with ES6 WeakMaps...

@vjeux
Copy link
Contributor

vjeux commented May 21, 2014

Looks like the following is working. How did you install jest? Using npm install jest -g?

node --harmony bin/jest.js -o
Using Jest CLI v0.1.11
Looking for changed files...
No tests to run!

I wonder if there's a way to specify node arguments this way

@ide
Copy link
Contributor Author

ide commented May 21, 2014

Jest is globally installed. I guess what I want is for "jest" to automatically run node --harmony.

On Wed, May 21, 2014 at 2:36 PM, Christopher Chedeau
notifications@github.com wrote:

Looks like the following is working. How did you install jest? Using npm install jest -g?

node --harmony bin/jest.js -o
Using Jest CLI v0.1.11
Looking for changed files...
No tests to run!

Reply to this email directly or view it on GitHub:
#47 (comment)

@vjeux
Copy link
Contributor

vjeux commented May 21, 2014

Can you try node-harmonize?

https://github.com/dcodeIO/node-harmonize

@sophiebits
Copy link
Contributor

We changed the shebang line because travis's env doesn't like "/usr/bin/env node --harmony".

@ide
Copy link
Contributor Author

ide commented May 21, 2014

What if we made "jest" a shell script that runs "usr/bin/env node --harmony jest.js $@"?

@sophiebits
Copy link
Contributor

Shell scripts won't work on Windows (but otherwise that sounds like a reasonable idea…).

@jeffmo
Copy link
Contributor

jeffmo commented May 22, 2014

We might be able to work some crazy child_process hackery in the bin/jest.js file if we detect that --harmony wasn't used to execute the file...

@ide
Copy link
Contributor Author

ide commented May 22, 2014

@jeffmo: I submitted PR #50 that uses @vjeux's suggestion of node-harmonize, which uses that trick. I don't know how to merge issues; sorry for opening up an extra one.

@ide ide closed this as completed May 22, 2014
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants