import { it } from "bun:test"; it("queueMicrotask", async () => { // You can verify this test is correct by copy pasting this into a browser's console and checking it doesn't throw an error. var run = 0; await new Promise((resolve, reject) => { queueMicrotask(() => { if (run++ != 0) { reject(new Error("Microtask execution order is wrong: " + run)); } queueMicrotask(() => { if (run++ != 3) { reject(new Error("Microtask execution order is wrong: " + run)); } }); }); queueMicrotask(() => { if (run++ != 1) { reject(new Error("Microtask execution order is wrong: " + run)); } queueMicrotask(() => { if (run++ != 4) { reject(new Error("Microtask execution order is wrong: " + run)); } queueMicrotask(() => { if (run++ != 6) { reject(new Error("Microtask execution order is wrong: " + run)); } }); }); }); queueMicrotask(() => { if (run++ != 2) { reject(new Error("Microtask execution order is wrong: " + run)); } queueMicrotask(() => { if (run++ != 5) { reject(new Error("Microtask execution order is wrong: " + run)); } queueMicrotask(() => { if (run++ != 7) { reject(new Error("Microtask execution order is wrong: " + run)); } resolve(true); }); }); }); }); { var passed = false; try { queueMicrotask(1234); } catch (exception) { passed = exception instanceof TypeError; } if (!passed) throw new Error( "queueMicrotask should throw a TypeError if the argument is not a function" ); } { var passed = false; try { queueMicrotask(); } catch (exception) { passed = exception instanceof TypeError; } if (!passed) throw new Error( "queueMicrotask should throw a TypeError if the argument is empty" ); } }); talogs'>chore/pnpm-10-and-catalogs Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/examples/ssr/public/images/products (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2022-06-28Fix Tailwind integration Typescript warning (#3732)Gravatar Victor 2-1/+6
2022-06-27[ci] formatGravatar bholmesdev 2-3/+3
2022-06-27Refactor: remove Deno shim to esbuild "banner" (#3734)Gravatar Ben Holmes 7-15/+22
2022-06-27[ci] formatGravatar FredKSchott 9-23/+25
2022-06-27update telemetry to support more anonymized project id (#3713)Gravatar Fred K. Schott 20-351/+311
2022-06-27SImplify "astro add" by removing confusing multi-select (#3715)Gravatar Fred K. Schott 13-258/+157