const fail = true; // import snippets from "./snippets.json"; // globalThis.console.assert = (condition, ...content) => { // if (!condition) { // throw new Error(content.join(" ")); // } // }; // globalThis.getModuleScriptSrc = async (name) => { // const response = await fetch(name, { // cache: "force-cache", // }); // if (response.ok) { // return await response.text(); // } else { // throw new Error(`Failed to get module script ${name}`); // } // }; // globalThis.runTest = async (name) => { // testSuccess = false; // var Namespace = await import(name); // var testFunction = Namespace.test; // if ( // !("test" in Namespace) && // "default" in Namespace && // typeof Namespace.default === "function" // ) { // Namespace = Namespace.default(); // testFunction = Namespace.test; // } // if (!testFunction) { // throw new Error("No test function found in " + name); // } // if (typeof testFunction !== "function") { // throw new Error( // `Expected (await import(\"${name}\"")) to have a test function.\nReceived: ${Object.keys( // Namespace // ).join(", ")} ` // ); // } // if (globalThis.BUN_DEBUG_MODE) { // try { // await testFunction(); // if (!testSuccess) { // throw new Error("Test failed"); // } // } catch (exception) { // console.error(exception); // debugger; // throw exception; // } // } else { // await testFunction(); // if (!testSuccess) { // throw new Error("Test failed"); // } // } // }; // var testSuccess = false; // globalThis.testDone = () => { // testSuccess = true; // }; // let fail = 0; // for (let snippet of snippets) { // try { // await runTest("../snippets/" + snippet.substring(1)); // console.log("✅", snippet); // } catch (exception) { // console.error(`❌ ${snippet}`); // console.error(exception); // fail++; // } // } if (fail) throw new Error(`❌ browser test failed (${fail})`); console.log(`✅ bun.js test passed`); ors-when-needed Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/src/api/demo/api.js (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2022-04-01[bun.js] Expose `ErrorEvent`Gravatar Jarred Sumner 2-37/+52
2022-04-01[bun.js] Use `Headers` from WebKit instead of customGravatar Jarred Sumner 44-843/+5918
2022-03-31Update WebKitGravatar Jarred Sumner 1-0/+0
2022-03-31Delete unusedGravatar Jarred Sumner 1-5/+0
2022-03-31Allow a little leeway when HMRGravatar Jarred Sumner 1-1/+2
2022-03-31Fix more infinite loopsGravatar Jarred Sumner 1-2/+2
2022-03-31Bugfixes to how we build WebCore codeGravatar Jarred Sumner 29-170/+384
2022-03-31[bun dev] Re-create the shared buffer for each websocketGravatar Jarred Sumner 1-6/+5
2022-03-31[bun dev] Improve HMR reliability when filesystem is slow or reading large filesGravatar Jarred Sumner 2-19/+68
2022-03-31Fix possible infinite loopsGravatar Jarred Sumner 1-3/+3
2022-03-30Update bindings.cppGravatar Jarred Sumner 1-0/+24
2022-03-30[bun.js] Support `file://` URLs in node fsGravatar Jarred Sumner 9-6/+102
2022-03-30Bump target next version to 12.1.3Gravatar Jarred Sumner 1-1/+1
2022-03-30Add test for Bun.hash that runs it with a Uint8ArrayGravatar Jarred Sumner 1-8/+16