aboutsummaryrefslogtreecommitdiff
path: root/integration/snippets/public
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-10-25 06:17:16 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-10-25 06:17:16 -0700
commiteae70511116b1b08fa11f77332f8a5aa21f7cd50 (patch)
treea26b5af69e3a3dd418a742cfc608924942cb3e3a /integration/snippets/public
parentadb6be05d1697d15edcddff6536d6dd6368e131e (diff)
downloadbun-eae70511116b1b08fa11f77332f8a5aa21f7cd50.tar.gz
bun-eae70511116b1b08fa11f77332f8a5aa21f7cd50.tar.zst
bun-eae70511116b1b08fa11f77332f8a5aa21f7cd50.zip
Add snapshots for latin1 regexp, add more codepoints to string escapes
Diffstat (limited to 'integration/snippets/public')
-rw-r--r--integration/snippets/public/index.html21
1 files changed, 19 insertions, 2 deletions
diff --git a/integration/snippets/public/index.html b/integration/snippets/public/index.html
index 2c3804a04..34e18a07a 100644
--- a/integration/snippets/public/index.html
+++ b/integration/snippets/public/index.html
@@ -10,7 +10,6 @@
globalThis.console.assert = (condition, ...content) => {
if (!condition) {
throw new Error(content.join(" "));
-
}
};
globalThis.getModuleScriptSrc = async (name) => {
@@ -50,10 +49,28 @@
);
}
- return await testFunction();
+ if (globalThis.BUN_DEBUG_MODE) {
+ try {
+ return await testFunction();
+ } catch (exception) {
+ console.error(exception);
+ debugger;
+ throw exception;
+ }
+ } else {
+ return await testFunction();
+ }
};
if (globalThis.location.pathname.endsWith("-test")) {
+ const script = document.createElement("script");
+ script.src = globalThis.location.pathname.substring(
+ 0,
+ location.pathname.length - "-test".length
+ );
+ script.type = "module";
+ document.body.appendChild(script);
+
globalThis.testDone = (path) => alert(`test ${path} success`);
globalThis.testFail = (path) => alert(`!test ${path} fail`);
runTest(