aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-11-15 15:59:13 -0800
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-11-15 15:59:13 -0800
commit18f0093b1847c9504618f3ece251934fa3cd4f9b (patch)
treec9149cdbff3eb92c4fc0876f8b9b4ead00a9717c
parentadfaa21d03733a8ebc57272fa8c09a7407486e48 (diff)
downloadbun-v0.0.49.tar.gz
bun-v0.0.49.tar.zst
bun-v0.0.49.zip
:camera: Snapshotsbun-v0.0.49
-rw-r--r--integration/snapshots/jsx-entities.hmr.jsx2
-rw-r--r--integration/snapshots/jsx-entities.jsx2
-rw-r--r--integration/snapshots/number-literal-bug.hmr.js31
-rw-r--r--integration/snapshots/number-literal-bug.js9
-rw-r--r--integration/snapshots/template-literal.hmr.js52
-rw-r--r--integration/snapshots/template-literal.js30
6 files changed, 124 insertions, 2 deletions
diff --git a/integration/snapshots/jsx-entities.hmr.jsx b/integration/snapshots/jsx-entities.hmr.jsx
index 7afe6db29..2ec3158d6 100644
--- a/integration/snapshots/jsx-entities.hmr.jsx
+++ b/integration/snapshots/jsx-entities.hmr.jsx
@@ -918,7 +918,7 @@ var hmr = new HMR(817082122, "jsx-entities.jsx"), exports = hmr.exports;
children: "."
}, undefined, false, undefined, this))]: 46,
[ReactDOM.renderToString(jsx(JSXFrag, {
- children: "\x2F"
+ children: "/"
}, undefined, false, undefined, this))]: 47,
[ReactDOM.renderToString(jsx(JSXFrag, {
children: "0"
diff --git a/integration/snapshots/jsx-entities.jsx b/integration/snapshots/jsx-entities.jsx
index 5d289b3d0..cfaf14c10 100644
--- a/integration/snapshots/jsx-entities.jsx
+++ b/integration/snapshots/jsx-entities.jsx
@@ -908,7 +908,7 @@ const elements = {
children: "."
}, undefined, false, undefined, this))]: 46,
[ReactDOM.renderToString(jsx(JSXFrag, {
- children: "\x2F"
+ children: "/"
}, undefined, false, undefined, this))]: 47,
[ReactDOM.renderToString(jsx(JSXFrag, {
children: "0"
diff --git a/integration/snapshots/number-literal-bug.hmr.js b/integration/snapshots/number-literal-bug.hmr.js
new file mode 100644
index 000000000..87cd08433
--- /dev/null
+++ b/integration/snapshots/number-literal-bug.hmr.js
@@ -0,0 +1,31 @@
+import {
+__HMRModule as HMR
+} from "http://localhost:8080/__runtime.js";
+import {
+__HMRClient as Bun
+} from "http://localhost:8080/__runtime.js";
+Bun.activate(false);
+
+var hmr = new HMR(583570002, "number-literal-bug.js"), exports = hmr.exports;
+(hmr._load = function() {
+ function test() {
+ const precision = 10;
+ try {
+ parseFloat(0 .toPrecision(precision) + "1");
+ } catch (exception) {
+ throw new Error("Test Failed", exception);
+ }
+ testDone(import.meta.url);
+ }
+ hmr.exportAll({
+ test: () => test
+ });
+})();
+var $$hmr_test = hmr.exports.test;
+hmr._update = function(exports) {
+ $$hmr_test = exports.test;
+};
+
+export {
+ $$hmr_test as test
+};
diff --git a/integration/snapshots/number-literal-bug.js b/integration/snapshots/number-literal-bug.js
new file mode 100644
index 000000000..c62e2d9ff
--- /dev/null
+++ b/integration/snapshots/number-literal-bug.js
@@ -0,0 +1,9 @@
+export function test() {
+ const precision = 10;
+ try {
+ parseFloat(0 .toPrecision(precision) + "1");
+ } catch (exception) {
+ throw new Error("Test Failed", exception);
+ }
+ testDone(import.meta.url);
+}
diff --git a/integration/snapshots/template-literal.hmr.js b/integration/snapshots/template-literal.hmr.js
new file mode 100644
index 000000000..d6a731b50
--- /dev/null
+++ b/integration/snapshots/template-literal.hmr.js
@@ -0,0 +1,52 @@
+import {
+__HMRModule as HMR
+} from "http://localhost:8080/__runtime.js";
+import {
+__HMRClient as Bun
+} from "http://localhost:8080/__runtime.js";
+Bun.activate(false);
+
+var hmr = new HMR(2201713056, "template-literal.js"), exports = hmr.exports;
+(hmr._load = function() {
+ const css = (templ) => templ.toString();
+ const fooNoBracesUTF8 = css`
+ before
+ /* */
+ after
+`;
+ const fooNoBracesUT16 = css`
+ before
+ 🙃
+ after
+`;
+ const fooUTF8 = css`
+ before
+ ${true}
+ after
+
+`;
+ const fooUTF16 = css`
+ before
+ 🙃 ${true}
+ after
+
+`;
+ function test() {
+ for (let foo of [fooNoBracesUT16, fooNoBracesUTF8, fooUTF16, fooUTF8]) {
+ console.assert(foo.includes("before"), `Expected ${foo} to include "before"`);
+ console.assert(foo.includes("after"), `Expected ${foo} to include "after"`);
+ }
+ return testDone(import.meta.url);
+ }
+ hmr.exportAll({
+ test: () => test
+ });
+})();
+var $$hmr_test = hmr.exports.test;
+hmr._update = function(exports) {
+ $$hmr_test = exports.test;
+};
+
+export {
+ $$hmr_test as test
+};
diff --git a/integration/snapshots/template-literal.js b/integration/snapshots/template-literal.js
new file mode 100644
index 000000000..5ed5af7ad
--- /dev/null
+++ b/integration/snapshots/template-literal.js
@@ -0,0 +1,30 @@
+const css = (templ) => templ.toString();
+const fooNoBracesUTF8 = css`
+ before
+ /* */
+ after
+`;
+const fooNoBracesUT16 = css`
+ before
+ 🙃
+ after
+`;
+const fooUTF8 = css`
+ before
+ ${true}
+ after
+
+`;
+const fooUTF16 = css`
+ before
+ 🙃 ${true}
+ after
+
+`;
+export function test() {
+ for (let foo of [fooNoBracesUT16, fooNoBracesUTF8, fooUTF16, fooUTF8]) {
+ console.assert(foo.includes("before"), `Expected ${foo} to include "before"`);
+ console.assert(foo.includes("after"), `Expected ${foo} to include "after"`);
+ }
+ return testDone(import.meta.url);
+}