Add full-blown test for the selfContained transformer
This commit is contained in:
6
test/fixtures/transformation/optional-self-contained/full/actual.js
vendored
Normal file
6
test/fixtures/transformation/optional-self-contained/full/actual.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import foo, * as bar from "someModule";
|
||||
|
||||
export const myWord = Symbol("abc");
|
||||
export function* giveWord () {
|
||||
yield myWord;
|
||||
}
|
||||
27
test/fixtures/transformation/optional-self-contained/full/expected.js
vendored
Normal file
27
test/fixtures/transformation/optional-self-contained/full/expected.js
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
|
||||
var _to5Runtime = require("6to5-runtime/6to5");
|
||||
|
||||
var _core = require("6to5-runtime/core-js");
|
||||
|
||||
var _regeneratorRuntime = require("6to5-runtime/regenerator");
|
||||
|
||||
var giveWord = _regeneratorRuntime.mark(function giveWord() {
|
||||
return _regeneratorRuntime.wrap(function giveWord$(context$1$0) {
|
||||
while (1) switch (context$1$0.prev = context$1$0.next) {
|
||||
case 0:
|
||||
context$1$0.next = 2;
|
||||
return myWord;
|
||||
case 2:
|
||||
case "end":
|
||||
return context$1$0.stop();
|
||||
}
|
||||
}, giveWord, this);
|
||||
});
|
||||
|
||||
exports.giveWord = giveWord;
|
||||
var foo = _to5Runtime.interopRequire(require("someModule"));
|
||||
|
||||
var bar = _to5Runtime.interopRequireWildcard(require("someModule"));
|
||||
|
||||
var myWord = exports.myWord = _core.Symbol("abc");
|
||||
Reference in New Issue
Block a user