diff options
author | 2022-11-25 06:48:02 -0800 | |
---|---|---|
committer | 2022-11-25 06:48:02 -0800 | |
commit | e851e5fddba5748c70338c60752ff6567ac9bf86 (patch) | |
tree | 70b58c3fd6d33652ab3bb2d478638ff2533026c8 /test/bun.js/inline.macro.js | |
parent | 1aff60d2ba3f7f5db61cb0fad35381fe63e8909e (diff) | |
download | bun-e851e5fddba5748c70338c60752ff6567ac9bf86.tar.gz bun-e851e5fddba5748c70338c60752ff6567ac9bf86.tar.zst bun-e851e5fddba5748c70338c60752ff6567ac9bf86.zip |
Fix macros that return a Promise
Diffstat (limited to 'test/bun.js/inline.macro.js')
-rw-r--r-- | test/bun.js/inline.macro.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/bun.js/inline.macro.js b/test/bun.js/inline.macro.js index ff0292d0a..0fd7491b9 100644 --- a/test/bun.js/inline.macro.js +++ b/test/bun.js/inline.macro.js @@ -1,3 +1,19 @@ export function whatDidIPass(expr, ctx) { return ctx; } + +export function promiseReturningFunction(expr, ctx) { + return new Promise((resolve, reject) => { + setTimeout(() => { + resolve(1); + }, 1); + }); +} + +export function promiseReturningCtx(expr, ctx) { + return new Promise((resolve, reject) => { + setTimeout(() => { + resolve(ctx); + }, 1); + }); +} |