forked from babel/babel
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
account for web.iterable (babel#283)
* account for web.iterable * extra test, remove unncessary warning
- Loading branch information
1 parent
57d41df
commit c9c5b21
Showing
19 changed files
with
117 additions
and
28 deletions.
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
1 change: 1 addition & 0 deletions
1
packages/babel-preset-env/test/fixtures/dom-iterable/symbol-iterator-in/actual.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 @@ | ||
Symbol.iterator in arr |
3 changes: 3 additions & 0 deletions
3
packages/babel-preset-env/test/fixtures/dom-iterable/symbol-iterator-in/expected.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,3 @@ | ||
import "babel-polyfill/lib/core-js/modules/es6.symbol"; | ||
import "babel-polyfill/lib/core-js/modules/web.dom.iterable"; | ||
Symbol.iterator in arr; |
8 changes: 8 additions & 0 deletions
8
packages/babel-preset-env/test/fixtures/dom-iterable/symbol-iterator-in/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,8 @@ | ||
{ | ||
"presets": [ | ||
["../../../../lib", { | ||
"useBuiltIns": true, | ||
"modules": false | ||
}] | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-preset-env/test/fixtures/dom-iterable/symbol-iterator/actual.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 @@ | ||
arr[Symbol.iterator]() |
3 changes: 3 additions & 0 deletions
3
packages/babel-preset-env/test/fixtures/dom-iterable/symbol-iterator/expected.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,3 @@ | ||
import "babel-polyfill/lib/core-js/modules/es6.symbol"; | ||
import "babel-polyfill/lib/core-js/modules/web.dom.iterable"; | ||
arr[Symbol.iterator](); |
8 changes: 8 additions & 0 deletions
8
packages/babel-preset-env/test/fixtures/dom-iterable/symbol-iterator/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,8 @@ | ||
{ | ||
"presets": [ | ||
["../../../../lib", { | ||
"useBuiltIns": true, | ||
"modules": false | ||
}] | ||
] | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/babel-preset-env/test/fixtures/dom-iterable/yield-non-star/actual.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,3 @@ | ||
function* a() { | ||
yield 1; | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/babel-preset-env/test/fixtures/dom-iterable/yield-non-star/expected.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,3 @@ | ||
function* a() { | ||
yield 1; | ||
} |
11 changes: 11 additions & 0 deletions
11
packages/babel-preset-env/test/fixtures/dom-iterable/yield-non-star/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,11 @@ | ||
{ | ||
"presets": [ | ||
["../../../../lib", { | ||
"useBuiltIns": true, | ||
"targets": { | ||
"chrome": 55 | ||
}, | ||
"modules": false | ||
}] | ||
] | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/babel-preset-env/test/fixtures/dom-iterable/yield-star/actual.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,3 @@ | ||
function* a() { | ||
yield* 1; | ||
} |
4 changes: 4 additions & 0 deletions
4
packages/babel-preset-env/test/fixtures/dom-iterable/yield-star/expected.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,4 @@ | ||
import "babel-polyfill/lib/core-js/modules/web.dom.iterable"; | ||
function* a() { | ||
yield* 1; | ||
} |
11 changes: 11 additions & 0 deletions
11
packages/babel-preset-env/test/fixtures/dom-iterable/yield-star/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,11 @@ | ||
{ | ||
"presets": [ | ||
["../../../../lib", { | ||
"useBuiltIns": true, | ||
"targets": { | ||
"chrome": 55 | ||
}, | ||
"modules": false | ||
}] | ||
] | ||
} |
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