From e2bf61379f26c809492a96c6ce4455bb1ea1b598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alu=C3=ADsio=20Augusto=20Silva=20Gon=C3=A7alves?= Date: Sun, 18 Jan 2015 23:10:26 -0200 Subject: [PATCH] Add full-blown test for the selfContained transformer --- .../optional-self-contained/full/actual.js | 6 +++++ .../optional-self-contained/full/expected.js | 27 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 test/fixtures/transformation/optional-self-contained/full/actual.js create mode 100644 test/fixtures/transformation/optional-self-contained/full/expected.js diff --git a/test/fixtures/transformation/optional-self-contained/full/actual.js b/test/fixtures/transformation/optional-self-contained/full/actual.js new file mode 100644 index 0000000000..3e8b1bcdbc --- /dev/null +++ b/test/fixtures/transformation/optional-self-contained/full/actual.js @@ -0,0 +1,6 @@ +import foo, * as bar from "someModule"; + +export const myWord = Symbol("abc"); +export function* giveWord () { + yield myWord; +} diff --git a/test/fixtures/transformation/optional-self-contained/full/expected.js b/test/fixtures/transformation/optional-self-contained/full/expected.js new file mode 100644 index 0000000000..cbd7e48fbf --- /dev/null +++ b/test/fixtures/transformation/optional-self-contained/full/expected.js @@ -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");