Skip to content

Commit

Permalink
test: add testcases for amd and umd
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung authored and nicolo-ribaudo committed Oct 14, 2020
1 parent 74bbc75 commit 9c22c3f
Show file tree
Hide file tree
Showing 40 changed files with 324 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { foo as "some exports" } from "foo";
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
define(["exports", "foo"], function (_exports, _foo) {
"use strict";

Object.defineProperty(_exports, "__esModule", {
value: true
});
Object.defineProperty(_exports, "some exports", {
enumerable: true,
get: function () {
return _foo.foo;
}
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
var foo, bar;
export {foo as "defaultExports", bar};
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
define(["exports"], function (_exports) {
"use strict";

Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.bar = _exports.defaultExports = void 0;
var foo, bar;
_exports.bar = bar;
_exports.defaultExports = foo;
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
var foo, bar;
export {foo as "default exports", bar};
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
define(["exports"], function (_exports) {
"use strict";

Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.bar = _exports["default exports"] = void 0;
var foo, bar;
_exports.bar = bar;
_exports["default exports"] = foo;
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { "defaultImports" as bar} from "foo";

bar;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
define(["foo"], function (_foo) {
"use strict";

_foo.defaultImports;
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {"default imports" as bar} from "foo";

bar;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
define(["foo"], function (_foo) {
"use strict";

_foo["default imports"];
});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { foo as "some exports" } from "foo";
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
define(["exports", "foo"], function (_exports, _foo) {
"use strict";

_exports.__esModule = true;
_exports["some exports"] = void 0;
_exports["some exports"] = _foo.foo;
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
var foo, bar;
export {foo as "defaultExports", bar};
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
define(["exports"], function (_exports) {
"use strict";

_exports.__esModule = true;
_exports.bar = _exports.defaultExports = void 0;
var foo, bar;
_exports.bar = bar;
_exports.defaultExports = foo;
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
var foo, bar;
export {foo as "default exports", bar};
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
define(["exports"], function (_exports) {
"use strict";

_exports.__esModule = true;
_exports.bar = _exports["default exports"] = void 0;
var foo, bar;
_exports.bar = bar;
_exports["default exports"] = foo;
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { "defaultImports" as bar} from "foo";

bar;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
define(["foo"], function (_foo) {
"use strict";

_foo.defaultImports;
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {"default imports" as bar} from "foo";

bar;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
define(["foo"], function (_foo) {
"use strict";

_foo["default imports"];
});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { foo as "some exports" } from "foo";
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(["exports", "foo"], factory);
} else if (typeof exports !== "undefined") {
factory(exports, require("foo"));
} else {
var mod = {
exports: {}
};
factory(mod.exports, global.foo);
global.input = mod.exports;
}
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _foo) {
"use strict";

_exports.__esModule = true;
_exports["some exports"] = void 0;
_exports["some exports"] = _foo.foo;
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
var foo, bar;
export {foo as "defaultExports", bar};
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(["exports"], factory);
} else if (typeof exports !== "undefined") {
factory(exports);
} else {
var mod = {
exports: {}
};
factory(mod.exports);
global.input = mod.exports;
}
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) {
"use strict";

_exports.__esModule = true;
_exports.bar = _exports.defaultExports = void 0;
var foo, bar;
_exports.bar = bar;
_exports.defaultExports = foo;
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
var foo, bar;
export {foo as "default exports", bar};
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(["exports"], factory);
} else if (typeof exports !== "undefined") {
factory(exports);
} else {
var mod = {
exports: {}
};
factory(mod.exports);
global.input = mod.exports;
}
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) {
"use strict";

_exports.__esModule = true;
_exports.bar = _exports["default exports"] = void 0;
var foo, bar;
_exports.bar = bar;
_exports["default exports"] = foo;
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { "defaultImports" as bar} from "foo";

bar;
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(["foo"], factory);
} else if (typeof exports !== "undefined") {
factory(require("foo"));
} else {
var mod = {
exports: {}
};
factory(global.foo);
global.input = mod.exports;
}
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_foo) {
"use strict";

_foo.defaultImports;
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {"default imports" as bar} from "foo";

bar;
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(["foo"], factory);
} else if (typeof exports !== "undefined") {
factory(require("foo"));
} else {
var mod = {
exports: {}
};
factory(global.foo);
global.input = mod.exports;
}
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_foo) {
"use strict";

_foo["default imports"];
});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { foo as "some exports" } from "foo";
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(["exports", "foo"], factory);
} else if (typeof exports !== "undefined") {
factory(exports, require("foo"));
} else {
var mod = {
exports: {}
};
factory(mod.exports, global.foo);
global.input = mod.exports;
}
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _foo) {
"use strict";

Object.defineProperty(_exports, "__esModule", {
value: true
});
Object.defineProperty(_exports, "some exports", {
enumerable: true,
get: function () {
return _foo.foo;
}
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
var foo, bar;
export {foo as "defaultExports", bar};
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(["exports"], factory);
} else if (typeof exports !== "undefined") {
factory(exports);
} else {
var mod = {
exports: {}
};
factory(mod.exports);
global.input = mod.exports;
}
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) {
"use strict";

Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.bar = _exports.defaultExports = void 0;
var foo, bar;
_exports.bar = bar;
_exports.defaultExports = foo;
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
var foo, bar;
export {foo as "default exports", bar};
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(["exports"], factory);
} else if (typeof exports !== "undefined") {
factory(exports);
} else {
var mod = {
exports: {}
};
factory(mod.exports);
global.input = mod.exports;
}
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) {
"use strict";

Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.bar = _exports["default exports"] = void 0;
var foo, bar;
_exports.bar = bar;
_exports["default exports"] = foo;
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { "defaultImports" as bar} from "foo";

bar;
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(["foo"], factory);
} else if (typeof exports !== "undefined") {
factory(require("foo"));
} else {
var mod = {
exports: {}
};
factory(global.foo);
global.input = mod.exports;
}
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_foo) {
"use strict";

_foo.defaultImports;
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {"default imports" as bar} from "foo";

bar;
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(["foo"], factory);
} else if (typeof exports !== "undefined") {
factory(require("foo"));
} else {
var mod = {
exports: {}
};
factory(global.foo);
global.input = mod.exports;
}
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_foo) {
"use strict";

_foo["default imports"];
});

0 comments on commit 9c22c3f

Please sign in to comment.