add generator and variable binding tests
This commit is contained in:
parent
194c080c64
commit
8023788305
3
test/fixtures/transformation/es6-modules-system/exports-generator/actual.js
vendored
Normal file
3
test/fixtures/transformation/es6-modules-system/exports-generator/actual.js
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export function* generator() {
|
||||||
|
yield 1;
|
||||||
|
}
|
||||||
23
test/fixtures/transformation/es6-modules-system/exports-generator/expected.js
vendored
Normal file
23
test/fixtures/transformation/es6-modules-system/exports-generator/expected.js
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
System.register([], function (_export) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var generator;
|
||||||
|
_export("generator", generator = regeneratorRuntime.mark(function generator() {
|
||||||
|
return regeneratorRuntime.wrap(function generator$(context$1$0) {
|
||||||
|
while (1) switch (context$1$0.prev = context$1$0.next) {
|
||||||
|
case 0:
|
||||||
|
context$1$0.next = 2;
|
||||||
|
return 1;
|
||||||
|
case 2:
|
||||||
|
case "end":
|
||||||
|
return context$1$0.stop();
|
||||||
|
}
|
||||||
|
}, generator, this);
|
||||||
|
}));
|
||||||
|
|
||||||
|
return {
|
||||||
|
setters: [],
|
||||||
|
execute: function () {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
@ -6,3 +6,4 @@ export let foo5;
|
|||||||
export const foo6 = 3;
|
export const foo6 = 3;
|
||||||
export function foo7 () {}
|
export function foo7 () {}
|
||||||
export class foo8 {}
|
export class foo8 {}
|
||||||
|
foo3 = 5;
|
||||||
|
|||||||
@ -17,6 +17,8 @@ System.register([], function (_export) {
|
|||||||
foo8 = function foo8() {};
|
foo8 = function foo8() {};
|
||||||
|
|
||||||
_export("foo8", foo8);
|
_export("foo8", foo8);
|
||||||
|
|
||||||
|
_export("foo3", foo3 = 5);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
Loading…
x
Reference in New Issue
Block a user