-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Remove babel polyfill from fixture test runner #12130
Merged
nicolo-ribaudo
merged 9 commits into
babel:main
from
JLHwung:remove-babel-polyfill-from-fixture-test-runner
Dec 22, 2020
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
1e4e938
chore: inject regenerator-runtime only in test runner
JLHwung 7d6400a
tests: requires minNode 10 for async-generator yield-star tests
JLHwung 8d857ea
feat: resolve relative plugins/presets in suite options
JLHwung d76ad9f
test: add integration test with corejs3 polyfill
JLHwung 4f4570e
yarn dedupe
nicolo-ribaudo 810f3db
test: polyfill object.getownpropertydescriptors in decorators tests
JLHwung 5f802ff
refactor: use babel-plugin-polyfill-corejs3
JLHwung 9b0a842
Update `babel-plugin-polyfill-corejs3`
nicolo-ribaudo 381f099
Update `babel-plugin-polyfill-es-shims`
nicolo-ribaudo File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...al-async-generator-functions/test/fixtures/yield-star-polyfill-corejs3/issue-9905/exec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const log = []; | ||
|
||
async function* func1() { | ||
log.push(1); | ||
yield "a"; | ||
log.push(2); | ||
} | ||
|
||
async function* func2() { | ||
yield* func1(); | ||
log.push(3); | ||
} | ||
|
||
return (async () => { | ||
const iterator = func2(); | ||
await iterator.next(); | ||
await iterator.return(); | ||
|
||
expect(log).toEqual([1]); | ||
})(); |
File renamed without changes.
12 changes: 12 additions & 0 deletions
12
...proposal-async-generator-functions/test/fixtures/yield-star-polyfill-corejs3/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"parserOpts": { | ||
"allowReturnOutsideFunction": true | ||
}, | ||
"plugins": [ | ||
"transform-async-to-generator", | ||
"proposal-async-generator-functions", | ||
["babel-plugin-polyfill-corejs3", { "method": "usage-pure", "targets": { | ||
"node": "6.17" | ||
}}] | ||
] | ||
} |
34 changes: 34 additions & 0 deletions
34
...fixtures/yield-star-polyfill-corejs3/return-method-with-finally-multiple-parallel/exec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const log = []; | ||
|
||
async function* inner() { | ||
try { | ||
log.push(1); | ||
yield "a"; | ||
log.push(2); | ||
yield "b"; | ||
log.push(3); | ||
} finally { | ||
log.push(4); | ||
yield "c"; | ||
log.push(5); | ||
} | ||
} | ||
|
||
async function* outer() { | ||
log.push(6); | ||
yield* inner(); | ||
log.push(7); | ||
} | ||
|
||
return (async () => { | ||
const iterator = outer(); | ||
|
||
let res = await iterator.next(); | ||
expect(res).toEqual({ value: "a", done: false }); | ||
expect(log).toEqual([6, 1]); | ||
|
||
const [res1, res2] = await Promise.all([ iterator.return("x"), iterator.return("y") ]); | ||
expect(res1).toEqual({ value: "c", done: false }); | ||
expect(res2).toEqual({ value: "y", done: true }); | ||
expect(log).toEqual([6, 1, 4]); | ||
})(); |
File renamed without changes.
37 changes: 37 additions & 0 deletions
37
...t/fixtures/yield-star-polyfill-corejs3/return-method-with-finally-multiple-serial/exec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
const log = []; | ||
|
||
async function* inner() { | ||
try { | ||
log.push(1); | ||
yield "a"; | ||
log.push(2); | ||
yield "b"; | ||
log.push(3); | ||
} finally { | ||
log.push(4); | ||
yield "c"; | ||
log.push(5); | ||
} | ||
} | ||
|
||
async function* outer() { | ||
log.push(6); | ||
yield* inner(); | ||
log.push(7); | ||
} | ||
|
||
return (async () => { | ||
const iterator = outer(); | ||
|
||
let res = await iterator.next(); | ||
expect(res).toEqual({ value: "a", done: false }); | ||
expect(log).toEqual([6, 1]); | ||
|
||
res = await iterator.return("x"); | ||
expect(res).toEqual({ value: "c", done: false }); | ||
expect(log).toEqual([6, 1, 4]); | ||
|
||
res = await iterator.return("y"); | ||
expect(res).toEqual({ value: "y", done: true }); | ||
expect(log).toEqual([6, 1, 4]); | ||
})(); |
File renamed without changes.
37 changes: 37 additions & 0 deletions
37
...or-functions/test/fixtures/yield-star-polyfill-corejs3/return-method-with-finally/exec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
const log = []; | ||
|
||
async function* inner() { | ||
try { | ||
log.push(1); | ||
yield "a"; | ||
log.push(2); | ||
yield "b"; | ||
log.push(3); | ||
} finally { | ||
log.push(4); | ||
yield "c"; | ||
log.push(5); | ||
} | ||
} | ||
|
||
async function* outer() { | ||
log.push(6); | ||
yield* inner(); | ||
log.push(7); | ||
} | ||
|
||
return (async () => { | ||
const iterator = outer(); | ||
|
||
let res = await iterator.next(); | ||
expect(res).toEqual({ value: "a", done: false }); | ||
expect(log).toEqual([6, 1]); | ||
|
||
res = await iterator.return(); | ||
expect(res).toEqual({ value: "c", done: false }); | ||
expect(log).toEqual([6, 1, 4]); | ||
|
||
res = await iterator.next(); | ||
expect(res).toEqual({ value: undefined, done: true }); | ||
expect(log).toEqual([6, 1, 4, 5, 7]); | ||
})(); |
31 changes: 31 additions & 0 deletions
31
...async-generator-functions/test/fixtures/yield-star-polyfill-corejs3/return-method/exec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const log = []; | ||
|
||
async function* inner() { | ||
log.push(1); | ||
yield "a"; | ||
log.push(2); | ||
yield "b"; | ||
log.push(3); | ||
} | ||
|
||
async function* outer() { | ||
log.push(4); | ||
yield* inner(); | ||
log.push(5); | ||
} | ||
|
||
return (async () => { | ||
const iterator = outer(); | ||
|
||
let res = await iterator.next(); | ||
expect(res).toEqual({ value: "a", done: false }); | ||
expect(log).toEqual([4, 1]); | ||
|
||
res = await iterator.return(); | ||
expect(res).toEqual({ value: undefined, done: true }); | ||
expect(log).toEqual([4, 1]); | ||
|
||
res = await iterator.next(); | ||
expect(res).toEqual({ value: undefined, done: true }); | ||
expect(log).toEqual([4, 1]); | ||
})(); |
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
They are moved to
@babel/helper-fixtures
.