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

Test arrow function inside generator. #5605

Merged
merged 3 commits into from Apr 12, 2017

Conversation

yavorsky
Copy link
Member

@yavorsky yavorsky commented Apr 7, 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

@yavorsky yavorsky changed the title Test arrow inside gen Test arrow function inside generator. Apr 7, 2017
@codecov
Copy link

codecov bot commented Apr 7, 2017

Codecov Report

Merging #5605 into 7.0 will increase coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              7.0    #5605      +/-   ##
==========================================
+ Coverage   84.39%   84.45%   +0.05%     
==========================================
  Files         285      285              
  Lines        9647     9647              
  Branches     2710     2710              
==========================================
+ Hits         8142     8147       +5     
+ Misses       1003      998       -5     
  Partials      502      502
Impacted Files Coverage Δ
...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 0b917c0...7e6e8a2. Read the comment docs.

const assert = require("assert");
const babel = require("babel-core");

test("Doesn't throw with arrow function inside generator", function () {
Copy link
Member

Choose a reason for hiding this comment

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

I think our tests are all describe and it.

I think this tests would be best as an exec.js test like https://github.com/babel/babel/blob/7.0/packages/babel-plugin-transform-regenerator/test/fixtures/function-sent/example/exec.js

Copy link
Member Author

@yavorsky yavorsky Apr 9, 2017

Choose a reason for hiding this comment

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

@loganfsmyth thanks! Initially, I created this for 6.0 as an addition for #5567 and needed to prevent running code (error with arrow functions with node < 4).

I think our tests are all describe and it.

Yeah, accidentally looked into https://github.com/babel/babel/blob/7.0/packages/babel-plugin-transform-es2015-modules-commonjs/test/esmodule-flag.js

I could change base branch to 6.0 or just update it to run with exec.js.

Copy link
Member

Choose a reason for hiding this comment

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

Focusing on 7.x seems best at this point. If you just want to test the input/output without exec.js you can go the expect.js and actual.js route too, not strong feelings really.

@existentialism existentialism added the PR: Internal 🏠 A type of pull request used for our changelog categories label Apr 10, 2017
@loganfsmyth loganfsmyth merged commit 3146b24 into babel:7.0 Apr 12, 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 PR: Internal 🏠 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants