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
Conversation
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 |
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
const assert = require("assert"); | ||
const babel = require("babel-core"); | ||
|
||
test("Doesn't throw with arrow function inside generator", function () { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.