better self contained module tests - fixes #634
This commit is contained in:
1
test/fixtures/transformation/self-contained/modules-amd/actual.js
vendored
Normal file
1
test/fixtures/transformation/self-contained/modules-amd/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import foo from "foo";
|
||||
6
test/fixtures/transformation/self-contained/modules-amd/expected.js
vendored
Normal file
6
test/fixtures/transformation/self-contained/modules-amd/expected.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
define(["exports", "foo", "6to5-runtime/helpers"], function (exports, _foo, _to5RuntimeHelpers) {
|
||||
"use strict";
|
||||
|
||||
var _to5Helpers = _to5RuntimeHelpers;
|
||||
var foo = _to5Helpers.interopRequire(_foo);
|
||||
});
|
||||
1
test/fixtures/transformation/self-contained/modules-common/actual.js
vendored
Normal file
1
test/fixtures/transformation/self-contained/modules-common/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import foo from "foo";
|
||||
5
test/fixtures/transformation/self-contained/modules-common/expected.js
vendored
Normal file
5
test/fixtures/transformation/self-contained/modules-common/expected.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
var _to5Helpers = require("6to5-runtime/helpers");
|
||||
|
||||
var foo = _to5Helpers.interopRequire(require("foo"));
|
||||
1
test/fixtures/transformation/self-contained/modules-system/actual.js
vendored
Normal file
1
test/fixtures/transformation/self-contained/modules-system/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
foo(...bar);
|
||||
13
test/fixtures/transformation/self-contained/modules-system/expected.js
vendored
Normal file
13
test/fixtures/transformation/self-contained/modules-system/expected.js
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
System.register(["6to5-runtime/helpers"], function (_export) {
|
||||
"use strict";
|
||||
|
||||
var _to5Helpers;
|
||||
return {
|
||||
setters: [function (_to5RuntimeHelpers) {
|
||||
_to5Helpers = _to5RuntimeHelpers;
|
||||
}],
|
||||
execute: function () {
|
||||
foo.apply(undefined, _to5Helpers.toArray(bar));
|
||||
}
|
||||
};
|
||||
});
|
||||
3
test/fixtures/transformation/self-contained/modules-system/options.json
vendored
Normal file
3
test/fixtures/transformation/self-contained/modules-system/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"modules": "system"
|
||||
}
|
||||
1
test/fixtures/transformation/self-contained/modules-umd/actual.js
vendored
Normal file
1
test/fixtures/transformation/self-contained/modules-umd/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import foo from "foo";
|
||||
12
test/fixtures/transformation/self-contained/modules-umd/expected.js
vendored
Normal file
12
test/fixtures/transformation/self-contained/modules-umd/expected.js
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
(function (factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["exports", "foo", "6to5-runtime/helpers"], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(exports, require("foo"), require("6to5-runtime/helpers"));
|
||||
}
|
||||
})(function (exports, _foo, _to5RuntimeHelpers) {
|
||||
"use strict";
|
||||
|
||||
var _to5Helpers = _to5RuntimeHelpers;
|
||||
var foo = _to5Helpers.interopRequire(_foo);
|
||||
});
|
||||
3
test/fixtures/transformation/self-contained/modules-umd/options.json
vendored
Normal file
3
test/fixtures/transformation/self-contained/modules-umd/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"modules": "umd"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
import foo from "someModule";
|
||||
@@ -1,6 +0,0 @@
|
||||
define(["exports", "someModule", "6to5-runtime/helpers"], function (exports, _someModule, _to5RuntimeHelpers) {
|
||||
"use strict";
|
||||
|
||||
var _to5Helpers = _to5RuntimeHelpers;
|
||||
var foo = _to5Helpers.interopRequire(_someModule);
|
||||
});
|
||||
@@ -1 +0,0 @@
|
||||
import * as foo from "someModule";
|
||||
@@ -1,5 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
var _to5Helpers = require("6to5-runtime/helpers");
|
||||
|
||||
var foo = _to5Helpers.interopRequireWildcard(require("someModule"));
|
||||
Reference in New Issue
Block a user