From 7e6da1d368c75fe980bf271feaa90643359e7045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alu=C3=ADsio=20Augusto=20Silva=20Gon=C3=A7alves?= Date: Sun, 18 Jan 2015 01:41:20 -0200 Subject: [PATCH] Add tests for the externalRegenerator transformer --- .../basic/actual.js | 2 ++ .../basic/expected.js | 17 +++++++++++++++++ .../options.json | 3 +++ 3 files changed, 22 insertions(+) create mode 100644 test/fixtures/transformation/optional-external-regenerator-runtime/basic/actual.js create mode 100644 test/fixtures/transformation/optional-external-regenerator-runtime/basic/expected.js create mode 100644 test/fixtures/transformation/optional-external-regenerator-runtime/options.json diff --git a/test/fixtures/transformation/optional-external-regenerator-runtime/basic/actual.js b/test/fixtures/transformation/optional-external-regenerator-runtime/basic/actual.js new file mode 100644 index 0000000000..ae6cc4d8c8 --- /dev/null +++ b/test/fixtures/transformation/optional-external-regenerator-runtime/basic/actual.js @@ -0,0 +1,2 @@ +void function* () { +}; diff --git a/test/fixtures/transformation/optional-external-regenerator-runtime/basic/expected.js b/test/fixtures/transformation/optional-external-regenerator-runtime/basic/expected.js new file mode 100644 index 0000000000..4121cc9700 --- /dev/null +++ b/test/fixtures/transformation/optional-external-regenerator-runtime/basic/expected.js @@ -0,0 +1,17 @@ +"use strict"; + +var _interopRequire = function (obj) { + return obj && (obj["default"] || obj); +}; + +var _regeneratorRuntime = _interopRequire(require("regenerator/runtime-module")); + +void _regeneratorRuntime.mark(function callee$0$0() { + return _regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { + while (1) switch (context$1$0.prev = context$1$0.next) { + case 0: + case "end": + return context$1$0.stop(); + } + }, callee$0$0, this); +}); diff --git a/test/fixtures/transformation/optional-external-regenerator-runtime/options.json b/test/fixtures/transformation/optional-external-regenerator-runtime/options.json new file mode 100644 index 0000000000..40d336b5be --- /dev/null +++ b/test/fixtures/transformation/optional-external-regenerator-runtime/options.json @@ -0,0 +1,3 @@ +{ + "optional": ["externalRegenerator"] +}