diff options
author | 2021-09-22 01:02:32 -0700 | |
---|---|---|
committer | 2021-09-22 01:02:32 -0700 | |
commit | a48a02bade5079ab7c5ddd293ba8dc3b2f87ed26 (patch) | |
tree | 152843c5cac9910fe8e21610053a1a694325a553 /integration/snapshots/export.hmr.debug.js | |
parent | 2326a1e1050d19a9b958893f07414f89e42dc82c (diff) | |
download | bun-a48a02bade5079ab7c5ddd293ba8dc3b2f87ed26.tar.gz bun-a48a02bade5079ab7c5ddd293ba8dc3b2f87ed26.tar.zst bun-a48a02bade5079ab7c5ddd293ba8dc3b2f87ed26.zip |
Switch to a single directory for storing snapshots and explicitly note whats a debug snapshot and a non-debug snapshot
Diffstat (limited to 'integration/snapshots/export.hmr.debug.js')
-rw-r--r-- | integration/snapshots/export.hmr.debug.js | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/integration/snapshots/export.hmr.debug.js b/integration/snapshots/export.hmr.debug.js new file mode 100644 index 000000000..b5d3e0ad1 --- /dev/null +++ b/integration/snapshots/export.hmr.debug.js @@ -0,0 +1,74 @@ +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 {} from "http://localhost:8080/_bacon.js"; |