diff options
author | 2022-06-22 23:21:48 -0700 | |
---|---|---|
committer | 2022-06-22 23:21:48 -0700 | |
commit | 729d445b6885f69dd2c6355f38707bd42851c791 (patch) | |
tree | f87a7c408929ea3f57bbb7ace380cf869da83c0e /test/snippets/export.js | |
parent | 25f820c6bf1d8ec6d444ef579cc036b8c0607b75 (diff) | |
download | bun-729d445b6885f69dd2c6355f38707bd42851c791.tar.gz bun-729d445b6885f69dd2c6355f38707bd42851c791.tar.zst bun-729d445b6885f69dd2c6355f38707bd42851c791.zip |
change the directory structurejarred/rename
Diffstat (limited to 'test/snippets/export.js')
-rw-r--r-- | test/snippets/export.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/snippets/export.js b/test/snippets/export.js new file mode 100644 index 000000000..fe0abfa53 --- /dev/null +++ b/test/snippets/export.js @@ -0,0 +1,29 @@ +import what from "./_auth"; +export { default as auth } from "./_auth"; +export { default as login } from "./_login"; +export * from "./_bacon"; +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 "./_bacon"; +export * as where from "./_auth"; +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); +} |