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 Node.js 4 support #5142

Merged
merged 3 commits into from
Dec 21, 2017
Merged

Fix Node.js 4 support #5142

merged 3 commits into from
Dec 21, 2017

Conversation

ai
Copy link
Contributor

@ai ai commented Dec 20, 2017

Summary

Improve unofficial Node.js 4 support

Test plan

No tests since support is unofficial

@SimenB
Copy link
Member

SimenB commented Dec 20, 2017

We could just transpile rest/spread and avoid the issue entirely...

@ai
Copy link
Contributor Author

ai commented Dec 20, 2017

@SimenB yeap, some packages transpile rest operator (seems like transpile by Flow) and some doesn’t. I am not sure how to enable transpiling for the whole project.

@SimenB
Copy link
Member

SimenB commented Dec 20, 2017

Should be enough to add https://www.npmjs.com/package/babel-plugin-transform-es2015-spread to https://github.com/facebook/jest/blob/1521c516c2cae8f4bfe41605640f273f9c17fb87/.babelrc

Right now we transpile rest arguments, but not spread, it seems

@ai
Copy link
Contributor Author

ai commented Dec 20, 2017

Thanks. Tomorrow I will update PR.

@codecov-io
Copy link

codecov-io commented Dec 20, 2017

Codecov Report

Merging #5142 into master will decrease coverage by 0.04%.
The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5142      +/-   ##
==========================================
- Coverage    60.7%   60.66%   -0.05%     
==========================================
  Files         201      201              
  Lines        6691     6693       +2     
  Branches        4        4              
==========================================
- Hits         4062     4060       -2     
- Misses       2628     2632       +4     
  Partials        1        1
Impacted Files Coverage Δ
packages/jest-config/src/normalize.js 93.1% <ø> (+1.14%) ⬆️
packages/jest-editor-support/src/Runner.js 50.94% <0%> (-7.55%) ⬇️
packages/jest-resolve/src/index.js 96.58% <100%> (-0.82%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1521c51...e82a9c1. Read the comment docs.

@ai ai requested a review from orta as a code owner December 20, 2017 14:27
@@ -52,7 +52,7 @@ async function jasmine2(
const originalIt = environment.global.it;
environment.global.it = (...args) => {
const stack = callsites()[1];
const it = originalIt(...args);
const it = originalIt.apply(this, ...args);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need the apply, do we?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. fix was pushed

@ai
Copy link
Contributor Author

ai commented Dec 20, 2017

I added babel-plugin-transform-es2015-spread (to root Yarn workspace) and revert all my previous ... fixes

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes sense.

It doesn't hurt to transpile this, even though "officially" we don't have to

@cpojer cpojer merged commit 72983d4 into jestjs:master Dec 21, 2017
@cpojer
Copy link
Member

cpojer commented Dec 21, 2017

Thanks! I’m not gonna be in front of a computer soon, maybe @mjesun can make a patch release?

@ai
Copy link
Contributor Author

ai commented Dec 22, 2017

Ping 😊

@mjesun
Copy link
Contributor

mjesun commented Dec 22, 2017

Hi! Jest 22.0.4 should be out. Enjoy! ☺️

@github-actions
Copy link

This pull request 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 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants