mirror of
https://github.com/oven-sh/bun
synced 2026-02-12 20:09:04 +00:00
📷 Snapshots
This commit is contained in:
2786
integration/snapshots/jsx-entities.hmr.jsx
Normal file
2786
integration/snapshots/jsx-entities.hmr.jsx
Normal file
File diff suppressed because it is too large
Load Diff
2765
integration/snapshots/jsx-entities.jsx
Normal file
2765
integration/snapshots/jsx-entities.jsx
Normal file
File diff suppressed because it is too large
Load Diff
67
integration/snapshots/jsx-spacing.hmr.jsx
Normal file
67
integration/snapshots/jsx-spacing.hmr.jsx
Normal 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
|
||||
};
|
||||
46
integration/snapshots/jsx-spacing.jsx
Normal file
46
integration/snapshots/jsx-spacing.jsx
Normal 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);
|
||||
}
|
||||
@@ -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),
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user