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

Update to Jest 23 #4539

Closed
wants to merge 2 commits into from
Closed

Update to Jest 23 #4539

wants to merge 2 commits into from

Conversation

duailibe
Copy link
Member

Changes are because of #3518 (comment)

We can do this now that we merged #4537

@duailibe
Copy link
Member Author

Guess not

@duailibe duailibe closed this May 24, 2018
@duailibe duailibe deleted the jest branch May 24, 2018 20:31
@SimenB
Copy link
Contributor

SimenB commented May 27, 2018

Segfault? 😭

@SimenB
Copy link
Contributor

SimenB commented May 27, 2018

Oh, syntax error on node 4, gotcha

@duailibe
Copy link
Member Author

@SimenB Yes, either Jest or a dependency

The node 6 tests are failing ever since we enabled them but I don't think it's Jest fault (#3457)

@SimenB
Copy link
Contributor

SimenB commented May 27, 2018

Doesn't seems like you set testEnvironment in your jest config? jsdom is the default (and uses destructuring, so probably the culprit). node is also faster. Might be worth a go?

@duailibe
Copy link
Member Author

@SimenB Thanks, I'll try that

@SimenB
Copy link
Contributor

SimenB commented May 27, 2018

Docs, if it helps: https://facebook.github.io/jest/docs/en/configuration.html#testenvironment-string

We have been talking about changing the default to node, but that would break "zero config" for react. Easy enough to google document is not defined, I suppose...

@rickhanlonii ^

@suchipi
Copy link
Member

suchipi commented May 27, 2018

@SimenB off-topic, but I'm interested in the discussion to change the default. Is there a relevant issue you could post a link to?

@SimenB
Copy link
Contributor

SimenB commented May 27, 2018

We discussed it at the summit this week. I do think there's an issue though, lemme see if I can dig it up.

EDIT: jestjs/jest#5815, not much of a discussion though...

@duailibe
Copy link
Member Author

@SimenB I think something else is failing

~/Code/prettier master*
❯ node -v
v4.9.1

~/Code/prettier master*
❯ yarn test -v
yarn run v1.6.0
$ jest -v
23.0.0
✨  Done in 0.37s.

~/Code/prettier master*
❯ yarn test
yarn run v1.6.0
$ jest
Test Suites: 0 of 838 total
Tests:       0 total
Snapshots:   0 total
Time:        0.395s, estimated 84s
Ran all test suites.
✨  Done in 1.96s.

That happens with testEnvironment node or unset

@SimenB
Copy link
Contributor

SimenB commented May 28, 2018

It's @babel/code-frame using invalid node 4 syntax. Not sure why it doesn't give any output, but since it's one of jest's dependencies, you can trigger transformation of it either

@SimenB
Copy link
Contributor

SimenB commented Jun 30, 2018

I'm looking into this now. We can try to do something clever ™ with the lockfile making sure we keep the babel deps on a version supported by node 4

@SimenB SimenB mentioned this pull request Jun 30, 2018
@SimenB
Copy link
Contributor

SimenB commented Jun 30, 2018

See #4782 - there's syntax issues in Prettier's code base, though

@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Sep 28, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Sep 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants