aboutsummaryrefslogtreecommitdiff
path: root/integration/snapshots/export.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-09-23 22:01:34 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-09-23 22:01:34 -0700
commit4bb41b95a826892107b7ff3ff610d23d5afa96b6 (patch)
tree439f273d09ae8fa845eaec24c9e436c8fd244be3 /integration/snapshots/export.js
parentf78f4854a4e474a08023841f4714f0cd3774126b (diff)
downloadbun-4bb41b95a826892107b7ff3ff610d23d5afa96b6.tar.gz
bun-4bb41b95a826892107b7ff3ff610d23d5afa96b6.tar.zst
bun-4bb41b95a826892107b7ff3ff610d23d5afa96b6.zip
:camera:
Diffstat (limited to 'integration/snapshots/export.js')
-rw-r--r--integration/snapshots/export.js95
1 files changed, 26 insertions, 69 deletions
diff --git a/integration/snapshots/export.js b/integration/snapshots/export.js
index b5d3e0ad1..534cb2a0c 100644
--- a/integration/snapshots/export.js
+++ b/integration/snapshots/export.js
@@ -1,74 +1,31 @@
-import {
-__HMRModule as HMR
-} from "http://localhost:8080/__runtime.js";
-import {
-__HMRClient as Bun
-} from "http://localhost:8080/__runtime.js";
import what from "http://localhost:8080/_auth.js";
-import * as where from "http://localhost:8080/_auth.js";
-Bun.activate(true);
-
-var hmr = new HMR(1879780259, "export.js"), exports = hmr.exports;
-(hmr._load = function() {
- var yoyoyo = "yoyoyo";
- function hey() {
- return true;
- }
- var foo = () => {
- };
- var bar = 100;
- var powerLevel = Symbol("9001");
- function test() {
- hey();
- foo();
- if (where.default !== "hi")
- throw new Error(`_auth import is incorrect.`);
- console.assert(powerLevel.description === "9001", "Symbol is not exported correctly");
- return testDone(import.meta.url);
- }
- hmr.exportAll({
- yoyoyo: () => yoyoyo,
- default: () => hey,
- foo: () => foo,
- bar: () => bar,
- powerLevel: () => powerLevel,
- what: () => what,
- when: () => what,
- whence: () => what,
- where: () => where,
- booop: () => bar,
- test: () => test
- });
-})();
-var $$hmr_yoyoyo = hmr.exports.yoyoyo, $$hmr_default = hmr.exports.default, $$hmr_foo = hmr.exports.foo, $$hmr_bar = hmr.exports.bar, $$hmr_powerLevel = hmr.exports.powerLevel, $$hmr_what = hmr.exports.what, $$hmr_when = hmr.exports.when, $$hmr_whence = hmr.exports.whence, $$hmr_where = hmr.exports.where, $$hmr_booop = hmr.exports.booop, $$hmr_test = hmr.exports.test;
-hmr._update = function(exports) {
- $$hmr_yoyoyo = exports.yoyoyo;
- $$hmr_default = exports.default;
- $$hmr_foo = exports.foo;
- $$hmr_bar = exports.bar;
- $$hmr_powerLevel = exports.powerLevel;
- $$hmr_what = exports.what;
- $$hmr_when = exports.when;
- $$hmr_whence = exports.whence;
- $$hmr_where = exports.where;
- $$hmr_booop = exports.booop;
- $$hmr_test = exports.test;
-};
-
-export {
- $$hmr_yoyoyo as yoyoyo,
- $$hmr_default as default,
- $$hmr_foo as foo,
- $$hmr_bar as bar,
- $$hmr_powerLevel as powerLevel,
- $$hmr_what as what,
- $$hmr_when as when,
- $$hmr_whence as whence,
- $$hmr_where as where,
- $$hmr_booop as booop,
- $$hmr_test as test
-};
export {default as auth} from "http://localhost:8080/_auth.js";
+
export {default as login} from "http://localhost:8080/_login.js";
export * from "http://localhost:8080/_bacon.js";
+export let yoyoyo = "yoyoyo";
+
+export default function hey() {
+ return true;
+}
+export const foo = () => {
+};
+export var bar = 100;
+export let powerLevel = Symbol("9001");
+
+export {what};
+export {what as when, what as whence};
export {} from "http://localhost:8080/_bacon.js";
+import * as where from "http://localhost:8080/_auth.js";
+
+export {where};
+
+export {bar as booop};
+export function test() {
+ hey();
+ foo();
+ if (where.default !== "hi")
+ throw new Error(`_auth import is incorrect.`);
+ console.assert(powerLevel.description === "9001", "Symbol is not exported correctly");
+ return testDone(import.meta.url);
+}