📷 Snapshots

This commit is contained in:
Jarred Sumner
2021-11-05 01:33:09 -07:00
parent d0823beef5
commit 3d6fab6e49
6 changed files with 5672 additions and 8 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,67 @@
import {
__HMRClient as Bun
} from "http://localhost:8080/__runtime.js";
import {
__require as require
} from "http://localhost:8080/__runtime.js";
import {
__HMRModule as HMR
} from "http://localhost:8080/__runtime.js";
import * as JSX from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js";
var jsx = require(JSX).jsxDEV;
import * as $1f6f0e67 from "http://localhost:8080/node_modules/react-dom/server.browser.js";
var ReactDOM = require($1f6f0e67);
Bun.activate(false);
var hmr = new HMR(3614189736, "jsx-spacing.jsx"), exports = hmr.exports;
(hmr._load = function() {
const ReturnDescriptionAsString = ({ description }) => description;
function test() {
const _bun = ReactDOM.renderToString(jsx(ReturnDescriptionAsString, {
description: `line1
line2 trailing space
line4 no trailing space 'single quote' \\t\\f\\v\\uF000 \`template string\`
line6 no trailing space
line7 trailing newline that \${terminates} the string literal
`
}, undefined, false, undefined, this));
const el = document.createElement("textarea");
el.innerHTML = _bun;
const bun = el.value;
const esbuild = `line1
line2 trailing space
line4 no trailing space 'single quote' \\t\\f\\v\\uF000 \`template string\`
line6 no trailing space
line7 trailing newline that \${terminates} the string literal
`;
const tsc = `line1
line2 trailing space
line4 no trailing space 'single quote' \\t\\f\\v\\uF000 \`template string\`
line6 no trailing space
line7 trailing newline that \${terminates} the string literal
`;
console.assert(bun === esbuild && bun === tsc, `strings did not match: ${JSON.stringify({
received: bun,
expected: esbuild
}, null, 2)}`);
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
};

View File

@@ -0,0 +1,46 @@
import {
__require as require
} from "http://localhost:8080/__runtime.js";
import * as JSX from "http://localhost:8080/node_modules/react/jsx-dev-runtime.js";
var jsx = require(JSX).jsxDEV;
import * as $1f6f0e67 from "http://localhost:8080/node_modules/react-dom/server.browser.js";
var ReactDOM = require($1f6f0e67);
const ReturnDescriptionAsString = ({ description }) => description;
export function test() {
const _bun = ReactDOM.renderToString(jsx(ReturnDescriptionAsString, {
description: `line1
line2 trailing space
line4 no trailing space 'single quote' \\t\\f\\v\\uF000 \`template string\`
line6 no trailing space
line7 trailing newline that \${terminates} the string literal
`
}, undefined, false, undefined, this));
const el = document.createElement("textarea");
el.innerHTML = _bun;
const bun = el.value;
const esbuild = `line1
line2 trailing space
line4 no trailing space 'single quote' \\t\\f\\v\\uF000 \`template string\`
line6 no trailing space
line7 trailing newline that \${terminates} the string literal
`;
const tsc = `line1
line2 trailing space
line4 no trailing space 'single quote' \\t\\f\\v\\uF000 \`template string\`
line6 no trailing space
line7 trailing newline that \${terminates} the string literal
`;
console.assert(bun === esbuild && bun === tsc, `strings did not match: ${JSON.stringify({
received: bun,
expected: esbuild
}, null, 2)}`);
testDone(import.meta.url);
}

View File

@@ -346,10 +346,10 @@ var hmr = new HMR(2482749838, "string-escapes.js"), exports = hmr.exports;
data: "\v"
}, undefined, false, undefined, this),
jsx("div", {
data: "\u2028"
data: "\\u2028"
}, undefined, false, undefined, this),
jsx("div", {
data: "\u2029"
data: "\\u2029"
}, undefined, false, undefined, this),
jsx("div", {
data: "😊"
@@ -401,11 +401,11 @@ var hmr = new HMR(2482749838, "string-escapes.js"), exports = hmr.exports;
jsx("div", {
children: "\v"
}, undefined, false, undefined, this),
jsx("div", {}, "\u2028", false, undefined, this),
jsx("div", {}, "\\u2028", false, undefined, this),
jsx("div", {
children: "\u2028"
}, undefined, false, undefined, this),
jsx("div", {}, "\u2029", false, undefined, this),
jsx("div", {}, "\\u2029", false, undefined, this),
jsx("div", {
children: "\u2029"
}, undefined, false, undefined, this),

View File

@@ -337,10 +337,10 @@ const jsxVariants = jsx(JSXFrag, {
data: "\v"
}, undefined, false, undefined, this),
jsx("div", {
data: "\u2028"
data: "\\u2028"
}, undefined, false, undefined, this),
jsx("div", {
data: "\u2029"
data: "\\u2029"
}, undefined, false, undefined, this),
jsx("div", {
data: "😊"
@@ -392,11 +392,11 @@ const jsxVariants = jsx(JSXFrag, {
jsx("div", {
children: "\v"
}, undefined, false, undefined, this),
jsx("div", {}, "\u2028", false, undefined, this),
jsx("div", {}, "\\u2028", false, undefined, this),
jsx("div", {
children: "\u2028"
}, undefined, false, undefined, this),
jsx("div", {}, "\u2029", false, undefined, this),
jsx("div", {}, "\\u2029", false, undefined, this),
jsx("div", {
children: "\u2029"
}, undefined, false, undefined, this),