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

Add test for arrow function inside generator #5595

Closed
wants to merge 6 commits into from

Conversation

yavorsky
Copy link
Member

@yavorsky yavorsky commented Apr 6, 2017

Q A
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Deprecations?
Spec Compliancy?
Tests Added/Pass? y
Fixed Tickets
License MIT
Doc PR
Dependency Changes

Add test for arrow function inside generator (babel/babel-preset-env#160).

@babel-bot
Copy link
Collaborator

Hey @yavorsky! It looks like one or more of your builds have failed. I've copied the relevant info below to save you some time.

@yavorsky
Copy link
Member Author

yavorsky commented Apr 6, 2017

Looks like node 0.12 throw, but the point of this test is to run regenerator-transform w/o arrow function transformation 😟

@xtuc
Copy link
Member

xtuc commented Apr 7, 2017

Do you want your fix in the 6.0 branch? Because in 7.0 the support for Node 0.10 and 0.12 was removed.

@yavorsky
Copy link
Member Author

yavorsky commented Apr 7, 2017

@xtuc it's just an addition for #5567
Updated regenerator-transform fixes this case.

@xtuc
Copy link
Member

xtuc commented Apr 7, 2017

Arrow function syntax isn't available on Node 0.12, that's why it fails to parse.

@@ -0,0 +1,5 @@
{
"plugins": [
"transform-regenerator"
Copy link
Member

Choose a reason for hiding this comment

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

I'm trying to add a ES2015 presets (like here), currently not working for me

Copy link
Member Author

@yavorsky yavorsky Apr 7, 2017

Choose a reason for hiding this comment

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

es2015 will transform arrow function, so there is no sense in this test. The goal is test for generator with arrow function inside 🙂

Copy link
Member

Choose a reason for hiding this comment

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

Sure, we should do a simple string comparaison here to avoid Node parsing it.

@codecov
Copy link

codecov bot commented Apr 7, 2017

Codecov Report

Merging #5595 into 6.x will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              6.x    #5595      +/-   ##
==========================================
+ Coverage   84.43%   84.47%   +0.04%     
==========================================
  Files         204      204              
  Lines        9599     9599              
  Branches     2696     2696              
==========================================
+ Hits         8105     8109       +4     
+ Misses       1007     1003       -4     
  Partials      487      487
Impacted Files Coverage Δ
packages/babel-traverse/src/visitors.js 85.71% <0%> (-0.96%) ⬇️
...bel-plugin-transform-es2015-classes/src/vanilla.js 90.17% <0%> (+0.42%) ⬆️
packages/babel-traverse/src/path/modification.js 74.75% <0%> (+0.97%) ⬆️
packages/babel-traverse/src/path/context.js 86.2% <0%> (+1.72%) ⬆️
packages/babel-helper-call-delegate/src/index.js 68% <0%> (+4%) ⬆️

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 3534bc8...9f067cd. Read the comment docs.

@yavorsky yavorsky requested a review from xtuc April 7, 2017 09:39
@hzoo
Copy link
Member

hzoo commented Apr 7, 2017

If it's just the test, we can just merge this in 7.x, no need to backport

@yavorsky yavorsky changed the base branch from 6.x to 7.0 April 7, 2017 15:03
@yavorsky yavorsky closed this Apr 7, 2017
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants