Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/build/deps/webkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// -lto variants built with ThinLTO (per-module summaries for cross-language
// importing), and the Windows ICU data table filtered + per-item zstd
// compressed (lazily decompressed via bun_icu_decompress.cpp).
export const WEBKIT_VERSION = "4895f45dfbd0d1226c4d41799887bc0ecb9f341b";
export const WEBKIT_VERSION = "autobuild-preview-pr-295-ff8154f3";

/**
* WebKit (JavaScriptCore) — the JS engine.
Expand Down
24 changes: 24 additions & 0 deletions test/js/node/async_hooks/async-local-storage-thenable.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,30 @@ test("Returning a thenable in an async function", async done => {
});
});

// https://github.com/oven-sh/bun/issues/34266
test("Returning a thenable in an async function after an await", async done => {
const { mustCall } = createCallCheckCtx(done);
const then: Function = mustCall(cb => {
assert.strictEqual(store.getStore(), data);
process.nextTick(cb);
}, 1);

function thenable() {
return {
get then() {
assert.strictEqual(store.getStore(), data);
return then;
},
};
}

await store.run(data, async () => {
await null;
assert.strictEqual(store.getStore(), data);
return thenable();
});
});

test("Resolving a thenable", async done => {
const { mustCall } = createCallCheckCtx(done);
const then: Function = mustCall(cb => {
Expand Down
Loading