aboutsummaryrefslogtreecommitdiff
path: root/integration/snapshots
diff options
context:
space:
mode:
Diffstat (limited to '')
-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);
+}
/span>/+1 2022-02-04[ci] yarn formatGravatar natemoo-re 1-2/+3 2022-02-04fix: HTML/SVG boolean attributes (#2538)Gravatar Nate Moore 2-3/+21 2022-02-04[ci] yarn formatGravatar matthewp 1-4/+2 2022-02-04fix: import local plugins into markdown (#2534)Gravatar Juan Martín Seery 9-22/+41 2022-02-04[ci] collect statsGravatar FredKSchott 1-0/+1 2022-02-03Append to list of HMR modules, don't override (#2532)Gravatar Matthew Phillips 2-1/+6 2022-02-03add back dev server host support (#2531)Gravatar Fred K. Schott 2-1/+14 2022-02-03simplify status code regexGravatar Fred K. Schott 2-87/+4 2022-02-03Adding StackUp Digital to the list of sponsors (#2521)Gravatar Astroalex 3-0/+10 2022-02-03[ci] collect statsGravatar FredKSchott 1-0/+1 2022-02-03[ci] yarn formatGravatar FredKSchott 2-3/+85 2022-02-02Handles all http error code file names the same as 404 files. (#2525)Gravatar Zade Viggers 2-4/+7 2022-02-02fix(sitemap): remove debug if sitemap disabled (#2514)Gravatar Mark Pinero 1-2/+2 2022-02-02[ci] update lockfile (#2515)Gravatar Fred K. Schott 1-276/+279 2022-02-02[ci] yarn formatGravatar matthewp 1-8/+8 2022-02-02[ci] release (next) (#2523)astro@0.23.0-next.1Gravatar github-actions[bot] 28-34/+41 2022-02-02[ci] yarn formatGravatar matthewp 2-17/+29 2022-02-02Fix support for scss in static build (#2522)Gravatar Matthew Phillips 6-20/+114 2022-02-02[ci] collect statsGravatar FredKSchott 1-0/+1 2022-02-01[ci] yarn formatGravatar matthewp 2-12/+12 2022-02-01[ci] release (next) (#2492)astro@0.23.0-next.0@astrojs/test-static-build-pkg@0.0.2@astrojs/markdown-remark@0.6.1-next.0Gravatar github-actions[bot] 31-43/+93 2022-02-01[ci] collect statsGravatar FredKSchott 1-0/+1 2022-01-31update congratsbot format againGravatar Fred K. Schott 1-1/+1 2022-01-31update congratsbot againGravatar Fred K. Schott 1-1/+1 2022-01-31Remove SVG animation on GitHub/NPM (#2512)Gravatar Nate Moore 1-21/+0 2022-01-31[ci] yarn formatGravatar natemoo-re 2-4/+6 2022-01-31Add Shiki as an alternative to Prism (#2497)Gravatar Juan Martín Seery 26-9/+356 2022-01-31Deprecate unescaped HTML inside of expressions (#2489)Gravatar Nate Moore 9-31/+74