add iterators
This commit is contained in:
1
test/fixtures/arrow-functions/expression/actual.js
vendored
Normal file
1
test/fixtures/arrow-functions/expression/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
arr.map(x => x * x);
|
||||
3
test/fixtures/arrow-functions/expression/expected.js
vendored
Normal file
3
test/fixtures/arrow-functions/expression/expected.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
arr.map(function (x) {
|
||||
return x * x;
|
||||
});
|
||||
5
test/fixtures/arrow-functions/statement/actual.js
vendored
Normal file
5
test/fixtures/arrow-functions/statement/actual.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
nums.forEach(v => {
|
||||
if (v % 5 === 0) {
|
||||
fives.push(v);
|
||||
}
|
||||
});
|
||||
5
test/fixtures/arrow-functions/statement/expected.js
vendored
Normal file
5
test/fixtures/arrow-functions/statement/expected.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
nums.forEach(function (v) {
|
||||
if (v % 5 === 0) {
|
||||
fives.push(v);
|
||||
}
|
||||
});
|
||||
3
test/fixtures/iterators/for-of-let/actual.js
vendored
Normal file
3
test/fixtures/iterators/for-of-let/actual.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
for (let i of arr) {
|
||||
|
||||
}
|
||||
5
test/fixtures/iterators/for-of-let/expected.js
vendored
Normal file
5
test/fixtures/iterators/for-of-let/expected.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
(function () {
|
||||
for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {
|
||||
var i = _step.value;
|
||||
}
|
||||
}());
|
||||
3
test/fixtures/iterators/for-of/actual.js
vendored
Normal file
3
test/fixtures/iterators/for-of/actual.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
for (var i of arr) {
|
||||
|
||||
}
|
||||
3
test/fixtures/iterators/for-of/expected.js
vendored
Normal file
3
test/fixtures/iterators/for-of/expected.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done; ) {
|
||||
var i = _step.value;
|
||||
}
|
||||
Reference in New Issue
Block a user