diff options
Diffstat (limited to 'test/snippets')
73 files changed, 1918 insertions, 0 deletions
diff --git a/test/snippets/_auth.js b/test/snippets/_auth.js new file mode 100644 index 000000000..407090812 --- /dev/null +++ b/test/snippets/_auth.js @@ -0,0 +1 @@ +export default "hi"; diff --git a/test/snippets/_bacon.js b/test/snippets/_bacon.js new file mode 100644 index 000000000..c07ffb9be --- /dev/null +++ b/test/snippets/_bacon.js @@ -0,0 +1 @@ +export let hello = true; diff --git a/test/snippets/_login.js b/test/snippets/_login.js new file mode 100644 index 000000000..b2fc2ef65 --- /dev/null +++ b/test/snippets/_login.js @@ -0,0 +1,3 @@ +export default function () { + return true; +} diff --git a/test/snippets/array-args-with-default-values.js b/test/snippets/array-args-with-default-values.js new file mode 100644 index 000000000..f733a1bfa --- /dev/null +++ b/test/snippets/array-args-with-default-values.js @@ -0,0 +1,28 @@ +var lines; +const data = () => + lines.map(([a = null, b = null, c = null, d = null]) => ({ + a, + b, + c, + d, + })); + +export function test() { + let ran = false; + lines = [ + [undefined, undefined, undefined, undefined], + [undefined, undefined, undefined, undefined], + [undefined, undefined, undefined, undefined], + [undefined, undefined, undefined, undefined], + ]; + + for (let foo of data()) { + console.assert(foo.a === null); + console.assert(foo.b === null); + console.assert(foo.c === null); + console.assert(foo.d === null); + ran = true; + } + console.assert(ran); + testDone(import.meta.url); +} diff --git a/test/snippets/bun.lockb b/test/snippets/bun.lockb Binary files differnew file mode 100755 index 000000000..127db7b6d --- /dev/null +++ b/test/snippets/bun.lockb diff --git a/test/snippets/bundled-entry-point.js b/test/snippets/bundled-entry-point.js new file mode 100644 index 000000000..a996f8632 --- /dev/null +++ b/test/snippets/bundled-entry-point.js @@ -0,0 +1,7 @@ +import "react"; + +var hello = 123 ? null ?? "world" : "ok"; + +export function test() { + return testDone(import.meta.url); +} diff --git a/test/snippets/caught-require.js b/test/snippets/caught-require.js new file mode 100644 index 000000000..6111d2b10 --- /dev/null +++ b/test/snippets/caught-require.js @@ -0,0 +1,31 @@ +// Since top-level await is Special, we run these checks in the top-level scope as well. +try { + require("this-package-should-not-exist"); +} catch (exception) {} + +try { + await import("this-package-should-not-exist"); +} catch (exception) {} + +import("this-package-should-not-exist").then( + () => {}, + () => {} +); + +export async function test() { + // none of these should error + try { + require("this-package-should-not-exist"); + } catch (exception) {} + + try { + await import("this-package-should-not-exist"); + } catch (exception) {} + + import("this-package-should-not-exist").then( + () => {}, + () => {} + ); + + return testDone(import.meta.url); +} diff --git a/test/snippets/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js b/test/snippets/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js new file mode 100644 index 000000000..1ba6c059d --- /dev/null +++ b/test/snippets/cjs-transform-shouldnt-have-static-imports-in-cjs-function.js @@ -0,0 +1,17 @@ +import _login from "./_login"; +import _auth from "./_auth"; +import * as _loginReally from "./_login"; +import * as _loginReally2 from "./_login"; +import * as _authReally from "./_auth"; + +// module.exports.iAmCommonJs = true; +// exports.YouAreCommonJS = true; +// require("./_login"); +// require("./_login"); +export { _login as login }; + +export function test() { + return testDone(import.meta.url); +} + +export let foo, bar; diff --git a/test/snippets/code-simplification-neql-define.js b/test/snippets/code-simplification-neql-define.js new file mode 100644 index 000000000..ed5c5c395 --- /dev/null +++ b/test/snippets/code-simplification-neql-define.js @@ -0,0 +1,56 @@ +var testFailed = false; +const invariant = () => { + testFailed = true; +}; +var $$m = (arg) => { + var module = { exports: {} }, + exports = module.exports; + return arg(module, exports); +}; +var size = 100, + ttl = 3600; + +export var $f332019d = $$m( + { + "relay-runtime/lib/network/RelayQueryResponseCache.js": ( + module, + exports + ) => { + var RelayQueryResponseCache = function () { + var foo = function RelayQueryResponseCache(_ref) { + var size = _ref.size, + ttl = _ref.ttl; + !(size > 0) + ? process.env.NODE_ENV !== "production" + ? invariant( + false, + "RelayQueryResponseCache: Expected the max cache size to be > 0, got " + + "`%s`.", + size + ) + : invariant(false) + : void 0; + !(ttl > 0) + ? process.env.NODE_ENV !== "production" + ? invariant( + false, + "RelayQueryResponseCache: Expected the max ttl to be > 0, got `%s`.", + ttl + ) + : invariant(false) + : void 0; + }; + foo({ size: 100, ttl: 3600 }); + }; + RelayQueryResponseCache(); + }, + }["relay-runtime/lib/network/RelayQueryResponseCache.js"] +); + +export function test() { + var foo = () => result; + // $f332019d; + + if (testFailed) throw new Error("invariant should not be called"); + return testDone(import.meta.url); +} diff --git a/test/snippets/custom-emotion-jsx/file.jsx b/test/snippets/custom-emotion-jsx/file.jsx new file mode 100644 index 000000000..c00cb0543 --- /dev/null +++ b/test/snippets/custom-emotion-jsx/file.jsx @@ -0,0 +1,15 @@ +import * as ReactDOM from "react-dom"; +export const Foo = () => <div css={{ content: '"it worked!"' }}></div>; + +export function test() { + const element = document.createElement("div"); + element.id = "custom-emotion-jsx"; + document.body.appendChild(element); + ReactDOM.render(<Foo />, element); + const style = window.getComputedStyle(element.firstChild); + if (!(style["content"] ?? "").includes("it worked!")) { + throw new Error('Expected "it worked!" but received: ' + style["content"]); + } + + return testDone(import.meta.url); +} diff --git a/test/snippets/custom-emotion-jsx/tsconfig.json b/test/snippets/custom-emotion-jsx/tsconfig.json new file mode 100644 index 000000000..7bb0f58a0 --- /dev/null +++ b/test/snippets/custom-emotion-jsx/tsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "jsxImportSource": "@emotion/react" + } +} diff --git a/test/snippets/export-default-module-hot.js b/test/snippets/export-default-module-hot.js new file mode 100644 index 000000000..aee4e2468 --- /dev/null +++ b/test/snippets/export-default-module-hot.js @@ -0,0 +1,6 @@ +// This test passes if there's no syntax error +export default typeof module !== "undefined" && module.id; + +export function test() { + testDone(import.meta.url); +} diff --git a/test/snippets/export.js b/test/snippets/export.js new file mode 100644 index 000000000..fe0abfa53 --- /dev/null +++ b/test/snippets/export.js @@ -0,0 +1,29 @@ +import what from "./_auth"; +export { default as auth } from "./_auth"; +export { default as login } from "./_login"; +export * from "./_bacon"; +export let yoyoyo = "yoyoyo"; +export default function hey() { + return true; +} +export const foo = () => {}; +export var bar = 100; +export let powerLevel = Symbol("9001"); +export { what }; +export { what as when, what as whence }; +export {} from "./_bacon"; +export * as where from "./_auth"; +export { bar as booop }; + +export function test() { + hey(); + foo(); + if (where.default !== "hi") { + throw new Error(`_auth import is incorrect.`); + } + console.assert( + powerLevel.description === "9001", + "Symbol is not exported correctly" + ); + return testDone(import.meta.url); +} diff --git a/test/snippets/forbid-in-is-correct.js b/test/snippets/forbid-in-is-correct.js new file mode 100644 index 000000000..cdd62bffb --- /dev/null +++ b/test/snippets/forbid-in-is-correct.js @@ -0,0 +1,10 @@ +var foo = () => { + // prettier-ignore + var D=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports); + return D; +}; + +export function test() { + foo(); + testDone(import.meta.url); +} diff --git a/test/snippets/global-is-remapped-to-globalThis.js b/test/snippets/global-is-remapped-to-globalThis.js new file mode 100644 index 000000000..06b887925 --- /dev/null +++ b/test/snippets/global-is-remapped-to-globalThis.js @@ -0,0 +1,4 @@ +export function test() { + console.assert(global === globalThis); + return testDone(import.meta.url); +} diff --git a/test/snippets/jsx-entities.jsx b/test/snippets/jsx-entities.jsx new file mode 100644 index 000000000..adabace2c --- /dev/null +++ b/test/snippets/jsx-entities.jsx @@ -0,0 +1,936 @@ +import * as ReactDOM from "react-dom/server"; + +const elements = { + [ReactDOM.renderToString(<>"</>)]: 0x0022, + [ReactDOM.renderToString(<>&</>)]: 0x0026, + [ReactDOM.renderToString(<>'</>)]: 0x0027, + [ReactDOM.renderToString(<><</>)]: 0x003c, + [ReactDOM.renderToString(<>></>)]: 0x003e, + [ReactDOM.renderToString(<> </>)]: 0x00a0, + [ReactDOM.renderToString(<>¡</>)]: 0x00a1, + [ReactDOM.renderToString(<>¢</>)]: 0x00a2, + [ReactDOM.renderToString(<>£</>)]: 0x00a3, + [ReactDOM.renderToString(<>¤</>)]: 0x00a4, + [ReactDOM.renderToString(<>¥</>)]: 0x00a5, + [ReactDOM.renderToString(<>¦</>)]: 0x00a6, + [ReactDOM.renderToString(<>§</>)]: 0x00a7, + [ReactDOM.renderToString(<>¨</>)]: 0x00a8, + [ReactDOM.renderToString(<>©</>)]: 0x00a9, + [ReactDOM.renderToString(<>ª</>)]: 0x00aa, + [ReactDOM.renderToString(<>«</>)]: 0x00ab, + [ReactDOM.renderToString(<>¬</>)]: 0x00ac, + [ReactDOM.renderToString(<>­</>)]: 0x00ad, + [ReactDOM.renderToString(<>®</>)]: 0x00ae, + [ReactDOM.renderToString(<>¯</>)]: 0x00af, + [ReactDOM.renderToString(<>°</>)]: 0x00b0, + [ReactDOM.renderToString(<>±</>)]: 0x00b1, + [ReactDOM.renderToString(<>²</>)]: 0x00b2, + [ReactDOM.renderToString(<>³</>)]: 0x00b3, + [ReactDOM.renderToString(<>´</>)]: 0x00b4, + [ReactDOM.renderToString(<>µ</>)]: 0x00b5, + [ReactDOM.renderToString(<>¶</>)]: 0x00b6, + [ReactDOM.renderToString(<>·</>)]: 0x00b7, + [ReactDOM.renderToString(<>¸</>)]: 0x00b8, + [ReactDOM.renderToString(<>¹</>)]: 0x00b9, + [ReactDOM.renderToString(<>º</>)]: 0x00ba, + [ReactDOM.renderToString(<>»</>)]: 0x00bb, + [ReactDOM.renderToString(<>¼</>)]: 0x00bc, + [ReactDOM.renderToString(<>½</>)]: 0x00bd, + [ReactDOM.renderToString(<>¾</>)]: 0x00be, + [ReactDOM.renderToString(<>¿</>)]: 0x00bf, + [ReactDOM.renderToString(<>À</>)]: 0x00c0, + [ReactDOM.renderToString(<>Á</>)]: 0x00c1, + [ReactDOM.renderToString(<>Â</>)]: 0x00c2, + [ReactDOM.renderToString(<>Ã</>)]: 0x00c3, + [ReactDOM.renderToString(<>Ä</>)]: 0x00c4, + [ReactDOM.renderToString(<>Å</>)]: 0x00c5, + [ReactDOM.renderToString(<>Æ</>)]: 0x00c6, + [ReactDOM.renderToString(<>Ç</>)]: 0x00c7, + [ReactDOM.renderToString(<>È</>)]: 0x00c8, + [ReactDOM.renderToString(<>É</>)]: 0x00c9, + [ReactDOM.renderToString(<>Ê</>)]: 0x00ca, + [ReactDOM.renderToString(<>Ë</>)]: 0x00cb, + [ReactDOM.renderToString(<>Ì</>)]: 0x00cc, + [ReactDOM.renderToString(<>Í</>)]: 0x00cd, + [ReactDOM.renderToString(<>Î</>)]: 0x00ce, + [ReactDOM.renderToString(<>Ï</>)]: 0x00cf, + [ReactDOM.renderToString(<>Ð</>)]: 0x00d0, + [ReactDOM.renderToString(<>Ñ</>)]: 0x00d1, + [ReactDOM.renderToString(<>Ò</>)]: 0x00d2, + [ReactDOM.renderToString(<>Ó</>)]: 0x00d3, + [ReactDOM.renderToString(<>Ô</>)]: 0x00d4, + [ReactDOM.renderToString(<>Õ</>)]: 0x00d5, + [ReactDOM.renderToString(<>Ö</>)]: 0x00d6, + [ReactDOM.renderToString(<>×</>)]: 0x00d7, + [ReactDOM.renderToString(<>Ø</>)]: 0x00d8, + [ReactDOM.renderToString(<>Ù</>)]: 0x00d9, + [ReactDOM.renderToString(<>Ú</>)]: 0x00da, + [ReactDOM.renderToString(<>Û</>)]: 0x00db, + [ReactDOM.renderToString(<>Ü</>)]: 0x00dc, + [ReactDOM.renderToString(<>Ý</>)]: 0x00dd, + [ReactDOM.renderToString(<>Þ</>)]: 0x00de, + [ReactDOM.renderToString(<>ß</>)]: 0x00df, + [ReactDOM.renderToString(<>à</>)]: 0x00e0, + [ReactDOM.renderToString(<>á</>)]: 0x00e1, + [ReactDOM.renderToString(<>â</>)]: 0x00e2, + [ReactDOM.renderToString(<>ã</>)]: 0x00e3, + [ReactDOM.renderToString(<>ä</>)]: 0x00e4, + [ReactDOM.renderToString(<>å</>)]: 0x00e5, + [ReactDOM.renderToString(<>æ</>)]: 0x00e6, + [ReactDOM.renderToString(<>ç</>)]: 0x00e7, + [ReactDOM.renderToString(<>è</>)]: 0x00e8, + [ReactDOM.renderToString(<>é</>)]: 0x00e9, + [ReactDOM.renderToString(<>ê</>)]: 0x00ea, + [ReactDOM.renderToString(<>ë</>)]: 0x00eb, + [ReactDOM.renderToString(<>ì</>)]: 0x00ec, + [ReactDOM.renderToString(<>í</>)]: 0x00ed, + [ReactDOM.renderToString(<>î</>)]: 0x00ee, + [ReactDOM.renderToString(<>ï</>)]: 0x00ef, + [ReactDOM.renderToString(<>ð</>)]: 0x00f0, + [ReactDOM.renderToString(<>ñ</>)]: 0x00f1, + [ReactDOM.renderToString(<>ò</>)]: 0x00f2, + [ReactDOM.renderToString(<>ó</>)]: 0x00f3, + [ReactDOM.renderToString(<>ô</>)]: 0x00f4, + [ReactDOM.renderToString(<>õ</>)]: 0x00f5, + [ReactDOM.renderToString(<>ö</>)]: 0x00f6, + [ReactDOM.renderToString(<>÷</>)]: 0x00f7, + [ReactDOM.renderToString(<>ø</>)]: 0x00f8, + [ReactDOM.renderToString(<>ù</>)]: 0x00f9, + [ReactDOM.renderToString(<>ú</>)]: 0x00fa, + [ReactDOM.renderToString(<>û</>)]: 0x00fb, + [ReactDOM.renderToString(<>ü</>)]: 0x00fc, + [ReactDOM.renderToString(<>ý</>)]: 0x00fd, + [ReactDOM.renderToString(<>þ</>)]: 0x00fe, + [ReactDOM.renderToString(<>ÿ</>)]: 0x00ff, + [ReactDOM.renderToString(<>Œ</>)]: 0x0152, + [ReactDOM.renderToString(<>œ</>)]: 0x0153, + [ReactDOM.renderToString(<>Š</>)]: 0x0160, + [ReactDOM.renderToString(<>š</>)]: 0x0161, + [ReactDOM.renderToString(<>Ÿ</>)]: 0x0178, + [ReactDOM.renderToString(<>ƒ</>)]: 0x0192, + [ReactDOM.renderToString(<>ˆ</>)]: 0x02c6, + [ReactDOM.renderToString(<>˜</>)]: 0x02dc, + [ReactDOM.renderToString(<>Α</>)]: 0x0391, + [ReactDOM.renderToString(<>Β</>)]: 0x0392, + [ReactDOM.renderToString(<>Γ</>)]: 0x0393, + [ReactDOM.renderToString(<>Δ</>)]: 0x0394, + [ReactDOM.renderToString(<>Ε</>)]: 0x0395, + [ReactDOM.renderToString(<>Ζ</>)]: 0x0396, + [ReactDOM.renderToString(<>Η</>)]: 0x0397, + [ReactDOM.renderToString(<>Θ</>)]: 0x0398, + [ReactDOM.renderToString(<>Ι</>)]: 0x0399, + [ReactDOM.renderToString(<>Κ</>)]: 0x039a, + [ReactDOM.renderToString(<>Λ</>)]: 0x039b, + [ReactDOM.renderToString(<>Μ</>)]: 0x039c, + [ReactDOM.renderToString(<>Ν</>)]: 0x039d, + [ReactDOM.renderToString(<>Ξ</>)]: 0x039e, + [ReactDOM.renderToString(<>Ο</>)]: 0x039f, + [ReactDOM.renderToString(<>Π</>)]: 0x03a0, + [ReactDOM.renderToString(<>Ρ</>)]: 0x03a1, + [ReactDOM.renderToString(<>Σ</>)]: 0x03a3, + [ReactDOM.renderToString(<>Τ</>)]: 0x03a4, + [ReactDOM.renderToString(<>Υ</>)]: 0x03a5, + [ReactDOM.renderToString(<>Φ</>)]: 0x03a6, + [ReactDOM.renderToString(<>Χ</>)]: 0x03a7, + [ReactDOM.renderToString(<>Ψ</>)]: 0x03a8, + [ReactDOM.renderToString(<>Ω</>)]: 0x03a9, + [ReactDOM.renderToString(<>α</>)]: 0x03b1, + [ReactDOM.renderToString(<>β</>)]: 0x03b2, + [ReactDOM.renderToString(<>γ</>)]: 0x03b3, + [ReactDOM.renderToString(<>δ</>)]: 0x03b4, + [ReactDOM.renderToString(<>ε</>)]: 0x03b5, + [ReactDOM.renderToString(<>ζ</>)]: 0x03b6, + [ReactDOM.renderToString(<>η</>)]: 0x03b7, + [ReactDOM.renderToString(<>θ</>)]: 0x03b8, + [ReactDOM.renderToString(<>ι</>)]: 0x03b9, + [ReactDOM.renderToString(<>κ</>)]: 0x03ba, + [ReactDOM.renderToString(<>λ</>)]: 0x03bb, + [ReactDOM.renderToString(<>μ</>)]: 0x03bc, + [ReactDOM.renderToString(<>ν</>)]: 0x03bd, + [ReactDOM.renderToString(<>ξ</>)]: 0x03be, + [ReactDOM.renderToString(<>ο</>)]: 0x03bf, + [ReactDOM.renderToString(<>π</>)]: 0x03c0, + [ReactDOM.renderToString(<>ρ</>)]: 0x03c1, + [ReactDOM.renderToString(<>ς</>)]: 0x03c2, + [ReactDOM.renderToString(<>σ</>)]: 0x03c3, + [ReactDOM.renderToString(<>τ</>)]: 0x03c4, + [ReactDOM.renderToString(<>υ</>)]: 0x03c5, + [ReactDOM.renderToString(<>φ</>)]: 0x03c6, + [ReactDOM.renderToString(<>χ</>)]: 0x03c7, + [ReactDOM.renderToString(<>ψ</>)]: 0x03c8, + [ReactDOM.renderToString(<>ω</>)]: 0x03c9, + [ReactDOM.renderToString(<>ϑ</>)]: 0x03d1, + [ReactDOM.renderToString(<>ϒ</>)]: 0x03d2, + [ReactDOM.renderToString(<>ϖ</>)]: 0x03d6, + [ReactDOM.renderToString(<> </>)]: 0x2002, + [ReactDOM.renderToString(<> </>)]: 0x2003, + [ReactDOM.renderToString(<> </>)]: 0x2009, + [ReactDOM.renderToString(<>‌</>)]: 0x200c, + [ReactDOM.renderToString(<>‍</>)]: 0x200d, + [ReactDOM.renderToString(<>‎</>)]: 0x200e, + [ReactDOM.renderToString(<>‏</>)]: 0x200f, + [ReactDOM.renderToString(<>–</>)]: 0x2013, + [ReactDOM.renderToString(<>—</>)]: 0x2014, + [ReactDOM.renderToString(<>‘</>)]: 0x2018, + [ReactDOM.renderToString(<>’</>)]: 0x2019, + [ReactDOM.renderToString(<>‚</>)]: 0x201a, + [ReactDOM.renderToString(<>“</>)]: 0x201c, + [ReactDOM.renderToString(<>”</>)]: 0x201d, + [ReactDOM.renderToString(<>„</>)]: 0x201e, + [ReactDOM.renderToString(<>†</>)]: 0x2020, + [ReactDOM.renderToString(<>‡</>)]: 0x2021, + [ReactDOM.renderToString(<>•</>)]: 0x2022, + [ReactDOM.renderToString(<>…</>)]: 0x2026, + [ReactDOM.renderToString(<>‰</>)]: 0x2030, + [ReactDOM.renderToString(<>′</>)]: 0x2032, + [ReactDOM.renderToString(<>″</>)]: 0x2033, + [ReactDOM.renderToString(<>‹</>)]: 0x2039, + [ReactDOM.renderToString(<>›</>)]: 0x203a, + [ReactDOM.renderToString(<>‾</>)]: 0x203e, + [ReactDOM.renderToString(<>⁄</>)]: 0x2044, + [ReactDOM.renderToString(<>€</>)]: 0x20ac, + [ReactDOM.renderToString(<>ℑ</>)]: 0x2111, + [ReactDOM.renderToString(<>℘</>)]: 0x2118, + [ReactDOM.renderToString(<>ℜ</>)]: 0x211c, + [ReactDOM.renderToString(<>™</>)]: 0x2122, + [ReactDOM.renderToString(<>ℵ</>)]: 0x2135, + [ReactDOM.renderToString(<>←</>)]: 0x2190, + [ReactDOM.renderToString(<>↑</>)]: 0x2191, + [ReactDOM.renderToString(<>→</>)]: 0x2192, + [ReactDOM.renderToString(<>↓</>)]: 0x2193, + [ReactDOM.renderToString(<>↔</>)]: 0x2194, + [ReactDOM.renderToString(<>↵</>)]: 0x21b5, + [ReactDOM.renderToString(<>⇐</>)]: 0x21d0, + [ReactDOM.renderToString(<>⇑</>)]: 0x21d1, + [ReactDOM.renderToString(<>⇒</>)]: 0x21d2, + [ReactDOM.renderToString(<>⇓</>)]: 0x21d3, + [ReactDOM.renderToString(<>⇔</>)]: 0x21d4, + [ReactDOM.renderToString(<>∀</>)]: 0x2200, + [ReactDOM.renderToString(<>∂</>)]: 0x2202, + [ReactDOM.renderToString(<>∃</>)]: 0x2203, + [ReactDOM.renderToString(<>∅</>)]: 0x2205, + [ReactDOM.renderToString(<>∇</>)]: 0x2207, + [ReactDOM.renderToString(<>∈</>)]: 0x2208, + [ReactDOM.renderToString(<>∉</>)]: 0x2209, + [ReactDOM.renderToString(<>∋</>)]: 0x220b, + [ReactDOM.renderToString(<>∏</>)]: 0x220f, + [ReactDOM.renderToString(<>∑</>)]: 0x2211, + [ReactDOM.renderToString(<>−</>)]: 0x2212, + [ReactDOM.renderToString(<>∗</>)]: 0x2217, + [ReactDOM.renderToString(<>√</>)]: 0x221a, + [ReactDOM.renderToString(<>∝</>)]: 0x221d, + [ReactDOM.renderToString(<>∞</>)]: 0x221e, + [ReactDOM.renderToString(<>∠</>)]: 0x2220, + [ReactDOM.renderToString(<>∧</>)]: 0x2227, + [ReactDOM.renderToString(<>∨</>)]: 0x2228, + [ReactDOM.renderToString(<>∩</>)]: 0x2229, + [ReactDOM.renderToString(<>∪</>)]: 0x222a, + [ReactDOM.renderToString(<>∫</>)]: 0x222b, + [ReactDOM.renderToString(<>∴</>)]: 0x2234, + [ReactDOM.renderToString(<>∼</>)]: 0x223c, + [ReactDOM.renderToString(<>≅</>)]: 0x2245, + [ReactDOM.renderToString(<>≈</>)]: 0x2248, + [ReactDOM.renderToString(<>≠</>)]: 0x2260, + [ReactDOM.renderToString(<>≡</>)]: 0x2261, + [ReactDOM.renderToString(<>≤</>)]: 0x2264, + [ReactDOM.renderToString(<>≥</>)]: 0x2265, + [ReactDOM.renderToString(<>⊂</>)]: 0x2282, + [ReactDOM.renderToString(<>⊃</>)]: 0x2283, + [ReactDOM.renderToString(<>⊄</>)]: 0x2284, + [ReactDOM.renderToString(<>⊆</>)]: 0x2286, + [ReactDOM.renderToString(<>⊇</>)]: 0x2287, + [ReactDOM.renderToString(<>⊕</>)]: 0x2295, + [ReactDOM.renderToString(<>⊗</>)]: 0x2297, + [ReactDOM.renderToString(<>⊥</>)]: 0x22a5, + [ReactDOM.renderToString(<>⋅</>)]: 0x22c5, + [ReactDOM.renderToString(<>⌈</>)]: 0x2308, + [ReactDOM.renderToString(<>⌉</>)]: 0x2309, + [ReactDOM.renderToString(<>⌊</>)]: 0x230a, + [ReactDOM.renderToString(<>⌋</>)]: 0x230b, + [ReactDOM.renderToString(<>⟨</>)]: 0x2329, + [ReactDOM.renderToString(<>⟩</>)]: 0x232a, + [ReactDOM.renderToString(<>◊</>)]: 0x25ca, + [ReactDOM.renderToString(<>♠</>)]: 0x2660, + [ReactDOM.renderToString(<>♣</>)]: 0x2663, + [ReactDOM.renderToString(<>♥</>)]: 0x2665, + [ReactDOM.renderToString(<>♦</>)]: 0x2666, + + [ReactDOM.renderToString(<></>)]: 0x1, + [ReactDOM.renderToString(<></>)]: 0x2, + [ReactDOM.renderToString(<></>)]: 0x3, + [ReactDOM.renderToString(<></>)]: 0x4, + [ReactDOM.renderToString(<></>)]: 0x5, + [ReactDOM.renderToString(<></>)]: 0x6, + [ReactDOM.renderToString(<></>)]: 0x7, + [ReactDOM.renderToString(<></>)]: 0x8, + [ReactDOM.renderToString(<>	</>)]: 0x9, + [ReactDOM.renderToString(<>
</>)]: 0xa, + [ReactDOM.renderToString(<></>)]: 0xb, + [ReactDOM.renderToString(<></>)]: 0xc, + [ReactDOM.renderToString(<>
</>)]: 0xd, + [ReactDOM.renderToString(<></>)]: 0xe, + [ReactDOM.renderToString(<></>)]: 0xf, + [ReactDOM.renderToString(<></>)]: 0x10, + [ReactDOM.renderToString(<></>)]: 0x11, + [ReactDOM.renderToString(<></>)]: 0x12, + [ReactDOM.renderToString(<></>)]: 0x13, + [ReactDOM.renderToString(<></>)]: 0x14, + [ReactDOM.renderToString(<></>)]: 0x15, + [ReactDOM.renderToString(<></>)]: 0x16, + [ReactDOM.renderToString(<></>)]: 0x17, + [ReactDOM.renderToString(<></>)]: 0x18, + [ReactDOM.renderToString(<></>)]: 0x19, + [ReactDOM.renderToString(<></>)]: 0x1a, + [ReactDOM.renderToString(<></>)]: 0x1b, + [ReactDOM.renderToString(<></>)]: 0x1c, + [ReactDOM.renderToString(<></>)]: 0x1d, + [ReactDOM.renderToString(<></>)]: 0x1e, + [ReactDOM.renderToString(<></>)]: 0x1f, + [ReactDOM.renderToString(<> </>)]: 0x20, + [ReactDOM.renderToString(<>!</>)]: 0x21, + [ReactDOM.renderToString(<>"</>)]: 0x22, + [ReactDOM.renderToString(<>#</>)]: 0x23, + [ReactDOM.renderToString(<>$</>)]: 0x24, + [ReactDOM.renderToString(<>%</>)]: 0x25, + [ReactDOM.renderToString(<>&</>)]: 0x26, + [ReactDOM.renderToString(<>'</>)]: 0x27, + [ReactDOM.renderToString(<>(</>)]: 0x28, + [ReactDOM.renderToString(<>)</>)]: 0x29, + [ReactDOM.renderToString(<>*</>)]: 0x2a, + [ReactDOM.renderToString(<>+</>)]: 0x2b, + [ReactDOM.renderToString(<>,</>)]: 0x2c, + [ReactDOM.renderToString(<>-</>)]: 0x2d, + [ReactDOM.renderToString(<>.</>)]: 0x2e, + [ReactDOM.renderToString(<>/</>)]: 0x2f, + [ReactDOM.renderToString(<>0</>)]: 0x30, + [ReactDOM.renderToString(<>1</>)]: 0x31, + [ReactDOM.renderToString(<>2</>)]: 0x32, + [ReactDOM.renderToString(<>3</>)]: 0x33, + [ReactDOM.renderToString(<>4</>)]: 0x34, + [ReactDOM.renderToString(<>5</>)]: 0x35, + [ReactDOM.renderToString(<>6</>)]: 0x36, + [ReactDOM.renderToString(<>7</>)]: 0x37, + [ReactDOM.renderToString(<>8</>)]: 0x38, + [ReactDOM.renderToString(<>9</>)]: 0x39, + [ReactDOM.renderToString(<>:</>)]: 0x3a, + [ReactDOM.renderToString(<>;</>)]: 0x3b, + [ReactDOM.renderToString(<><</>)]: 0x3c, + [ReactDOM.renderToString(<>=</>)]: 0x3d, + [ReactDOM.renderToString(<>></>)]: 0x3e, + [ReactDOM.renderToString(<>?</>)]: 0x3f, + [ReactDOM.renderToString(<>@</>)]: 0x40, + [ReactDOM.renderToString(<>A</>)]: 0x41, + [ReactDOM.renderToString(<>B</>)]: 0x42, + [ReactDOM.renderToString(<>C</>)]: 0x43, + [ReactDOM.renderToString(<>D</>)]: 0x44, + [ReactDOM.renderToString(<>E</>)]: 0x45, + [ReactDOM.renderToString(<>F</>)]: 0x46, + [ReactDOM.renderToString(<>G</>)]: 0x47, + [ReactDOM.renderToString(<>H</>)]: 0x48, + [ReactDOM.renderToString(<>I</>)]: 0x49, + [ReactDOM.renderToString(<>J</>)]: 0x4a, + [ReactDOM.renderToString(<>K</>)]: 0x4b, + [ReactDOM.renderToString(<>L</>)]: 0x4c, + [ReactDOM.renderToString(<>M</>)]: 0x4d, + [ReactDOM.renderToString(<>N</>)]: 0x4e, + [ReactDOM.renderToString(<>O</>)]: 0x4f, + [ReactDOM.renderToString(<>P</>)]: 0x50, + [ReactDOM.renderToString(<>Q</>)]: 0x51, + [ReactDOM.renderToString(<>R</>)]: 0x52, + [ReactDOM.renderToString(<>S</>)]: 0x53, + [ReactDOM.renderToString(<>T</>)]: 0x54, + [ReactDOM.renderToString(<>U</>)]: 0x55, + [ReactDOM.renderToString(<>V</>)]: 0x56, + [ReactDOM.renderToString(<>W</>)]: 0x57, + [ReactDOM.renderToString(<>X</>)]: 0x58, + [ReactDOM.renderToString(<>Y</>)]: 0x59, + [ReactDOM.renderToString(<>Z</>)]: 0x5a, + [ReactDOM.renderToString(<>[</>)]: 0x5b, + [ReactDOM.renderToString(<>\</>)]: 0x5c, + [ReactDOM.renderToString(<>]</>)]: 0x5d, + [ReactDOM.renderToString(<>^</>)]: 0x5e, + [ReactDOM.renderToString(<>_</>)]: 0x5f, + [ReactDOM.renderToString(<>`</>)]: 0x60, + [ReactDOM.renderToString(<>a</>)]: 0x61, + [ReactDOM.renderToString(<>b</>)]: 0x62, + [ReactDOM.renderToString(<>c</>)]: 0x63, + [ReactDOM.renderToString(<>d</>)]: 0x64, + [ReactDOM.renderToString(<>e</>)]: 0x65, + [ReactDOM.renderToString(<>f</>)]: 0x66, + [ReactDOM.renderToString(<>g</>)]: 0x67, + [ReactDOM.renderToString(<>h</>)]: 0x68, + [ReactDOM.renderToString(<>i</>)]: 0x69, + [ReactDOM.renderToString(<>j</>)]: 0x6a, + [ReactDOM.renderToString(<>k</>)]: 0x6b, + [ReactDOM.renderToString(<>l</>)]: 0x6c, + [ReactDOM.renderToString(<>m</>)]: 0x6d, + [ReactDOM.renderToString(<>n</>)]: 0x6e, + [ReactDOM.renderToString(<>o</>)]: 0x6f, + [ReactDOM.renderToString(<>p</>)]: 0x70, + [ReactDOM.renderToString(<>q</>)]: 0x71, + [ReactDOM.renderToString(<>r</>)]: 0x72, + [ReactDOM.renderToString(<>s</>)]: 0x73, + [ReactDOM.renderToString(<>t</>)]: 0x74, + [ReactDOM.renderToString(<>u</>)]: 0x75, + [ReactDOM.renderToString(<>v</>)]: 0x76, + [ReactDOM.renderToString(<>w</>)]: 0x77, + [ReactDOM.renderToString(<>x</>)]: 0x78, + [ReactDOM.renderToString(<>y</>)]: 0x79, + [ReactDOM.renderToString(<>z</>)]: 0x7a, + [ReactDOM.renderToString(<>{</>)]: 0x7b, + [ReactDOM.renderToString(<>|</>)]: 0x7c, + [ReactDOM.renderToString(<>}</>)]: 0x7d, + [ReactDOM.renderToString(<>~</>)]: 0x7e, + [ReactDOM.renderToString(<></>)]: 0x7f, + [ReactDOM.renderToString(<>€</>)]: 0x80, + [ReactDOM.renderToString(<></>)]: 0x81, + [ReactDOM.renderToString(<>‚</>)]: 0x82, + [ReactDOM.renderToString(<>ƒ</>)]: 0x83, + [ReactDOM.renderToString(<>„</>)]: 0x84, + [ReactDOM.renderToString(<>…</>)]: 0x85, + [ReactDOM.renderToString(<>†</>)]: 0x86, + [ReactDOM.renderToString(<>‡</>)]: 0x87, + [ReactDOM.renderToString(<>ˆ</>)]: 0x88, + [ReactDOM.renderToString(<>‰</>)]: 0x89, + [ReactDOM.renderToString(<>Š</>)]: 0x8a, + [ReactDOM.renderToString(<>‹</>)]: 0x8b, + [ReactDOM.renderToString(<>Œ</>)]: 0x8c, + [ReactDOM.renderToString(<></>)]: 0x8d, + [ReactDOM.renderToString(<>Ž</>)]: 0x8e, + [ReactDOM.renderToString(<></>)]: 0x8f, + [ReactDOM.renderToString(<></>)]: 0x90, + [ReactDOM.renderToString(<>‘</>)]: 0x91, + [ReactDOM.renderToString(<>’</>)]: 0x92, + [ReactDOM.renderToString(<>“</>)]: 0x93, + [ReactDOM.renderToString(<>”</>)]: 0x94, + [ReactDOM.renderToString(<>•</>)]: 0x95, + [ReactDOM.renderToString(<>–</>)]: 0x96, + [ReactDOM.renderToString(<>—</>)]: 0x97, + [ReactDOM.renderToString(<>˜</>)]: 0x98, + [ReactDOM.renderToString(<>™</>)]: 0x99, + [ReactDOM.renderToString(<>š</>)]: 0x9a, + [ReactDOM.renderToString(<>›</>)]: 0x9b, + [ReactDOM.renderToString(<>œ</>)]: 0x9c, + [ReactDOM.renderToString(<></>)]: 0x9d, + [ReactDOM.renderToString(<>ž</>)]: 0x9e, + [ReactDOM.renderToString(<>Ÿ</>)]: 0x9f, + [ReactDOM.renderToString(<> </>)]: 0xa0, + [ReactDOM.renderToString(<>¡</>)]: 0xa1, + [ReactDOM.renderToString(<>¢</>)]: 0xa2, + [ReactDOM.renderToString(<>£</>)]: 0xa3, + [ReactDOM.renderToString(<>¤</>)]: 0xa4, + [ReactDOM.renderToString(<>¥</>)]: 0xa5, + [ReactDOM.renderToString(<>¦</>)]: 0xa6, + [ReactDOM.renderToString(<>§</>)]: 0xa7, + [ReactDOM.renderToString(<>¨</>)]: 0xa8, + [ReactDOM.renderToString(<>©</>)]: 0xa9, + [ReactDOM.renderToString(<>ª</>)]: 0xaa, + [ReactDOM.renderToString(<>«</>)]: 0xab, + [ReactDOM.renderToString(<>¬</>)]: 0xac, + [ReactDOM.renderToString(<>­</>)]: 0xad, + [ReactDOM.renderToString(<>®</>)]: 0xae, + [ReactDOM.renderToString(<>¯</>)]: 0xaf, + [ReactDOM.renderToString(<>°</>)]: 0xb0, + [ReactDOM.renderToString(<>±</>)]: 0xb1, + [ReactDOM.renderToString(<>²</>)]: 0xb2, + [ReactDOM.renderToString(<>³</>)]: 0xb3, + [ReactDOM.renderToString(<>´</>)]: 0xb4, + [ReactDOM.renderToString(<>µ</>)]: 0xb5, + [ReactDOM.renderToString(<>¶</>)]: 0xb6, + [ReactDOM.renderToString(<>·</>)]: 0xb7, + [ReactDOM.renderToString(<>¸</>)]: 0xb8, + [ReactDOM.renderToString(<>¹</>)]: 0xb9, + [ReactDOM.renderToString(<>º</>)]: 0xba, + [ReactDOM.renderToString(<>»</>)]: 0xbb, + [ReactDOM.renderToString(<>¼</>)]: 0xbc, + [ReactDOM.renderToString(<>½</>)]: 0xbd, + [ReactDOM.renderToString(<>¾</>)]: 0xbe, + [ReactDOM.renderToString(<>¿</>)]: 0xbf, + [ReactDOM.renderToString(<>À</>)]: 0xc0, + [ReactDOM.renderToString(<>Á</>)]: 0xc1, + [ReactDOM.renderToString(<>Â</>)]: 0xc2, + [ReactDOM.renderToString(<>Ã</>)]: 0xc3, + [ReactDOM.renderToString(<>Ä</>)]: 0xc4, + [ReactDOM.renderToString(<>Å</>)]: 0xc5, + [ReactDOM.renderToString(<>Æ</>)]: 0xc6, + [ReactDOM.renderToString(<>Ç</>)]: 0xc7, + [ReactDOM.renderToString(<>È</>)]: 0xc8, + [ReactDOM.renderToString(<>É</>)]: 0xc9, + [ReactDOM.renderToString(<>Ê</>)]: 0xca, + [ReactDOM.renderToString(<>Ë</>)]: 0xcb, + [ReactDOM.renderToString(<>Ì</>)]: 0xcc, + [ReactDOM.renderToString(<>Í</>)]: 0xcd, + [ReactDOM.renderToString(<>Î</>)]: 0xce, + [ReactDOM.renderToString(<>Ï</>)]: 0xcf, + [ReactDOM.renderToString(<>Ð</>)]: 0xd0, + [ReactDOM.renderToString(<>Ñ</>)]: 0xd1, + [ReactDOM.renderToString(<>Ò</>)]: 0xd2, + [ReactDOM.renderToString(<>Ó</>)]: 0xd3, + [ReactDOM.renderToString(<>Ô</>)]: 0xd4, + [ReactDOM.renderToString(<>Õ</>)]: 0xd5, + [ReactDOM.renderToString(<>Ö</>)]: 0xd6, + [ReactDOM.renderToString(<>×</>)]: 0xd7, + [ReactDOM.renderToString(<>Ø</>)]: 0xd8, + [ReactDOM.renderToString(<>Ù</>)]: 0xd9, + [ReactDOM.renderToString(<>Ú</>)]: 0xda, + [ReactDOM.renderToString(<>Û</>)]: 0xdb, + [ReactDOM.renderToString(<>Ü</>)]: 0xdc, + [ReactDOM.renderToString(<>Ý</>)]: 0xdd, + [ReactDOM.renderToString(<>Þ</>)]: 0xde, + [ReactDOM.renderToString(<>ß</>)]: 0xdf, + [ReactDOM.renderToString(<>à</>)]: 0xe0, + [ReactDOM.renderToString(<>á</>)]: 0xe1, + [ReactDOM.renderToString(<>â</>)]: 0xe2, + [ReactDOM.renderToString(<>ã</>)]: 0xe3, + [ReactDOM.renderToString(<>ä</>)]: 0xe4, + [ReactDOM.renderToString(<>å</>)]: 0xe5, + [ReactDOM.renderToString(<>æ</>)]: 0xe6, + [ReactDOM.renderToString(<>ç</>)]: 0xe7, + [ReactDOM.renderToString(<>è</>)]: 0xe8, + [ReactDOM.renderToString(<>é</>)]: 0xe9, + [ReactDOM.renderToString(<>ê</>)]: 0xea, + [ReactDOM.renderToString(<>ë</>)]: 0xeb, + [ReactDOM.renderToString(<>ì</>)]: 0xec, + [ReactDOM.renderToString(<>í</>)]: 0xed, + [ReactDOM.renderToString(<>î</>)]: 0xee, + [ReactDOM.renderToString(<>ï</>)]: 0xef, + [ReactDOM.renderToString(<>ð</>)]: 0xf0, + [ReactDOM.renderToString(<>ñ</>)]: 0xf1, + [ReactDOM.renderToString(<>ò</>)]: 0xf2, + [ReactDOM.renderToString(<>ó</>)]: 0xf3, + [ReactDOM.renderToString(<>ô</>)]: 0xf4, + [ReactDOM.renderToString(<>õ</>)]: 0xf5, + [ReactDOM.renderToString(<>ö</>)]: 0xf6, + [ReactDOM.renderToString(<>÷</>)]: 0xf7, + [ReactDOM.renderToString(<>ø</>)]: 0xf8, + [ReactDOM.renderToString(<>ù</>)]: 0xf9, + [ReactDOM.renderToString(<>ú</>)]: 0xfa, + [ReactDOM.renderToString(<>û</>)]: 0xfb, + [ReactDOM.renderToString(<>ü</>)]: 0xfc, + [ReactDOM.renderToString(<>ý</>)]: 0xfd, + [ReactDOM.renderToString(<>þ</>)]: 0xfe, + [ReactDOM.renderToString(<>ÿ</>)]: 0xff, + [ReactDOM.renderToString(<>Ā</>)]: 0x100, + [ReactDOM.renderToString(<>ā</>)]: 0x101, + [ReactDOM.renderToString(<>Ă</>)]: 0x102, + [ReactDOM.renderToString(<>ă</>)]: 0x103, + [ReactDOM.renderToString(<>Ą</>)]: 0x104, + [ReactDOM.renderToString(<>ą</>)]: 0x105, + [ReactDOM.renderToString(<>Ć</>)]: 0x106, + [ReactDOM.renderToString(<>ć</>)]: 0x107, + [ReactDOM.renderToString(<>Ĉ</>)]: 0x108, + [ReactDOM.renderToString(<>ĉ</>)]: 0x109, + [ReactDOM.renderToString(<>Ċ</>)]: 0x10a, + [ReactDOM.renderToString(<>ċ</>)]: 0x10b, + [ReactDOM.renderToString(<>Č</>)]: 0x10c, + [ReactDOM.renderToString(<>č</>)]: 0x10d, + [ReactDOM.renderToString(<>Ď</>)]: 0x10e, + [ReactDOM.renderToString(<>ď</>)]: 0x10f, + [ReactDOM.renderToString(<>Đ</>)]: 0x110, + [ReactDOM.renderToString(<>đ</>)]: 0x111, + [ReactDOM.renderToString(<>Ē</>)]: 0x112, + [ReactDOM.renderToString(<>ē</>)]: 0x113, + [ReactDOM.renderToString(<>Ĕ</>)]: 0x114, + [ReactDOM.renderToString(<>ĕ</>)]: 0x115, + [ReactDOM.renderToString(<>Ė</>)]: 0x116, + [ReactDOM.renderToString(<>ė</>)]: 0x117, + [ReactDOM.renderToString(<>Ę</>)]: 0x118, + [ReactDOM.renderToString(<>ę</>)]: 0x119, + [ReactDOM.renderToString(<>Ě</>)]: 0x11a, + [ReactDOM.renderToString(<>ě</>)]: 0x11b, + [ReactDOM.renderToString(<>Ĝ</>)]: 0x11c, + [ReactDOM.renderToString(<>ĝ</>)]: 0x11d, + [ReactDOM.renderToString(<>Ğ</>)]: 0x11e, + [ReactDOM.renderToString(<>ğ</>)]: 0x11f, + [ReactDOM.renderToString(<>Ġ</>)]: 0x120, + [ReactDOM.renderToString(<>ġ</>)]: 0x121, + [ReactDOM.renderToString(<>Ģ</>)]: 0x122, + [ReactDOM.renderToString(<>ģ</>)]: 0x123, + [ReactDOM.renderToString(<>Ĥ</>)]: 0x124, + [ReactDOM.renderToString(<>ĥ</>)]: 0x125, + [ReactDOM.renderToString(<>Ħ</>)]: 0x126, + [ReactDOM.renderToString(<>ħ</>)]: 0x127, + [ReactDOM.renderToString(<>Ĩ</>)]: 0x128, + [ReactDOM.renderToString(<>ĩ</>)]: 0x129, + [ReactDOM.renderToString(<>Ī</>)]: 0x12a, + [ReactDOM.renderToString(<>ī</>)]: 0x12b, + [ReactDOM.renderToString(<>Ĭ</>)]: 0x12c, + [ReactDOM.renderToString(<>ĭ</>)]: 0x12d, + [ReactDOM.renderToString(<>Į</>)]: 0x12e, + [ReactDOM.renderToString(<>į</>)]: 0x12f, + [ReactDOM.renderToString(<>İ</>)]: 0x130, + [ReactDOM.renderToString(<>ı</>)]: 0x131, + [ReactDOM.renderToString(<>IJ</>)]: 0x132, + [ReactDOM.renderToString(<>ij</>)]: 0x133, + [ReactDOM.renderToString(<>Ĵ</>)]: 0x134, + [ReactDOM.renderToString(<>ĵ</>)]: 0x135, + [ReactDOM.renderToString(<>Ķ</>)]: 0x136, + [ReactDOM.renderToString(<>ķ</>)]: 0x137, + [ReactDOM.renderToString(<>ĸ</>)]: 0x138, + [ReactDOM.renderToString(<>Ĺ</>)]: 0x139, + [ReactDOM.renderToString(<>ĺ</>)]: 0x13a, + [ReactDOM.renderToString(<>Ļ</>)]: 0x13b, + [ReactDOM.renderToString(<>ļ</>)]: 0x13c, + [ReactDOM.renderToString(<>Ľ</>)]: 0x13d, + [ReactDOM.renderToString(<>ľ</>)]: 0x13e, + [ReactDOM.renderToString(<>Ŀ</>)]: 0x13f, + [ReactDOM.renderToString(<>ŀ</>)]: 0x140, + [ReactDOM.renderToString(<>Ł</>)]: 0x141, + [ReactDOM.renderToString(<>ł</>)]: 0x142, + [ReactDOM.renderToString(<>Ń</>)]: 0x143, + [ReactDOM.renderToString(<>ń</>)]: 0x144, + [ReactDOM.renderToString(<>Ņ</>)]: 0x145, + [ReactDOM.renderToString(<>ņ</>)]: 0x146, + [ReactDOM.renderToString(<>Ň</>)]: 0x147, + [ReactDOM.renderToString(<>ň</>)]: 0x148, + [ReactDOM.renderToString(<>ʼn</>)]: 0x149, + [ReactDOM.renderToString(<>Ŋ</>)]: 0x14a, + [ReactDOM.renderToString(<>ŋ</>)]: 0x14b, + [ReactDOM.renderToString(<>Ō</>)]: 0x14c, + [ReactDOM.renderToString(<>ō</>)]: 0x14d, + [ReactDOM.renderToString(<>Ŏ</>)]: 0x14e, + [ReactDOM.renderToString(<>ŏ</>)]: 0x14f, + [ReactDOM.renderToString(<>Ő</>)]: 0x150, + [ReactDOM.renderToString(<>ő</>)]: 0x151, + [ReactDOM.renderToString(<>Œ</>)]: 0x152, + [ReactDOM.renderToString(<>œ</>)]: 0x153, + [ReactDOM.renderToString(<>Ŕ</>)]: 0x154, + [ReactDOM.renderToString(<>ŕ</>)]: 0x155, + [ReactDOM.renderToString(<>Ŗ</>)]: 0x156, + [ReactDOM.renderToString(<>ŗ</>)]: 0x157, + [ReactDOM.renderToString(<>Ř</>)]: 0x158, + [ReactDOM.renderToString(<>ř</>)]: 0x159, + [ReactDOM.renderToString(<>Ś</>)]: 0x15a, + [ReactDOM.renderToString(<>ś</>)]: 0x15b, + [ReactDOM.renderToString(<>Ŝ</>)]: 0x15c, + [ReactDOM.renderToString(<>ŝ</>)]: 0x15d, + [ReactDOM.renderToString(<>Ş</>)]: 0x15e, + [ReactDOM.renderToString(<>ş</>)]: 0x15f, + [ReactDOM.renderToString(<>Š</>)]: 0x160, + [ReactDOM.renderToString(<>š</>)]: 0x161, + [ReactDOM.renderToString(<>Ţ</>)]: 0x162, + [ReactDOM.renderToString(<>ţ</>)]: 0x163, + [ReactDOM.renderToString(<>Ť</>)]: 0x164, + [ReactDOM.renderToString(<>ť</>)]: 0x165, + [ReactDOM.renderToString(<>Ŧ</>)]: 0x166, + [ReactDOM.renderToString(<>ŧ</>)]: 0x167, + [ReactDOM.renderToString(<>Ũ</>)]: 0x168, + [ReactDOM.renderToString(<>ũ</>)]: 0x169, + [ReactDOM.renderToString(<>Ū</>)]: 0x16a, + [ReactDOM.renderToString(<>ū</>)]: 0x16b, + [ReactDOM.renderToString(<>Ŭ</>)]: 0x16c, + [ReactDOM.renderToString(<>ŭ</>)]: 0x16d, + [ReactDOM.renderToString(<>Ů</>)]: 0x16e, + [ReactDOM.renderToString(<>ů</>)]: 0x16f, + [ReactDOM.renderToString(<>Ű</>)]: 0x170, + [ReactDOM.renderToString(<>ű</>)]: 0x171, + [ReactDOM.renderToString(<>Ų</>)]: 0x172, + [ReactDOM.renderToString(<>ų</>)]: 0x173, + [ReactDOM.renderToString(<>Ŵ</>)]: 0x174, + [ReactDOM.renderToString(<>ŵ</>)]: 0x175, + [ReactDOM.renderToString(<>Ŷ</>)]: 0x176, + [ReactDOM.renderToString(<>ŷ</>)]: 0x177, + [ReactDOM.renderToString(<>Ÿ</>)]: 0x178, + [ReactDOM.renderToString(<>Ź</>)]: 0x179, + [ReactDOM.renderToString(<>ź</>)]: 0x17a, + [ReactDOM.renderToString(<>Ż</>)]: 0x17b, + [ReactDOM.renderToString(<>ż</>)]: 0x17c, + [ReactDOM.renderToString(<>Ž</>)]: 0x17d, + [ReactDOM.renderToString(<>ž</>)]: 0x17e, + [ReactDOM.renderToString(<>ſ</>)]: 0x17f, + [ReactDOM.renderToString(<>ƀ</>)]: 0x180, + [ReactDOM.renderToString(<>Ɓ</>)]: 0x181, + [ReactDOM.renderToString(<>Ƃ</>)]: 0x182, + [ReactDOM.renderToString(<>ƃ</>)]: 0x183, + [ReactDOM.renderToString(<>Ƅ</>)]: 0x184, + [ReactDOM.renderToString(<>ƅ</>)]: 0x185, + [ReactDOM.renderToString(<>Ɔ</>)]: 0x186, + [ReactDOM.renderToString(<>Ƈ</>)]: 0x187, + [ReactDOM.renderToString(<>ƈ</>)]: 0x188, + [ReactDOM.renderToString(<>Ɖ</>)]: 0x189, + [ReactDOM.renderToString(<>Ɗ</>)]: 0x18a, + [ReactDOM.renderToString(<>Ƌ</>)]: 0x18b, + [ReactDOM.renderToString(<>ƌ</>)]: 0x18c, + [ReactDOM.renderToString(<>ƍ</>)]: 0x18d, + [ReactDOM.renderToString(<>Ǝ</>)]: 0x18e, + [ReactDOM.renderToString(<>Ə</>)]: 0x18f, + [ReactDOM.renderToString(<>Ɛ</>)]: 0x190, + [ReactDOM.renderToString(<>Ƒ</>)]: 0x191, + [ReactDOM.renderToString(<>ƒ</>)]: 0x192, + [ReactDOM.renderToString(<>Ɠ</>)]: 0x193, + [ReactDOM.renderToString(<>Ɣ</>)]: 0x194, + [ReactDOM.renderToString(<>ƕ</>)]: 0x195, + [ReactDOM.renderToString(<>Ɩ</>)]: 0x196, + [ReactDOM.renderToString(<>Ɨ</>)]: 0x197, + [ReactDOM.renderToString(<>Ƙ</>)]: 0x198, + [ReactDOM.renderToString(<>ƙ</>)]: 0x199, + [ReactDOM.renderToString(<>ƚ</>)]: 0x19a, + [ReactDOM.renderToString(<>ƛ</>)]: 0x19b, + [ReactDOM.renderToString(<>Ɯ</>)]: 0x19c, + [ReactDOM.renderToString(<>Ɲ</>)]: 0x19d, + [ReactDOM.renderToString(<>ƞ</>)]: 0x19e, + [ReactDOM.renderToString(<>Ɵ</>)]: 0x19f, + [ReactDOM.renderToString(<>Ơ</>)]: 0x1a0, + [ReactDOM.renderToString(<>ơ</>)]: 0x1a1, + [ReactDOM.renderToString(<>Ƣ</>)]: 0x1a2, + [ReactDOM.renderToString(<>ƣ</>)]: 0x1a3, + [ReactDOM.renderToString(<>Ƥ</>)]: 0x1a4, + [ReactDOM.renderToString(<>ƥ</>)]: 0x1a5, + [ReactDOM.renderToString(<>Ʀ</>)]: 0x1a6, + [ReactDOM.renderToString(<>Ƨ</>)]: 0x1a7, + [ReactDOM.renderToString(<>ƨ</>)]: 0x1a8, + [ReactDOM.renderToString(<>Ʃ</>)]: 0x1a9, + [ReactDOM.renderToString(<>ƪ</>)]: 0x1aa, + [ReactDOM.renderToString(<>ƫ</>)]: 0x1ab, + [ReactDOM.renderToString(<>Ƭ</>)]: 0x1ac, + [ReactDOM.renderToString(<>ƭ</>)]: 0x1ad, + [ReactDOM.renderToString(<>Ʈ</>)]: 0x1ae, + [ReactDOM.renderToString(<>Ư</>)]: 0x1af, + [ReactDOM.renderToString(<>ư</>)]: 0x1b0, + [ReactDOM.renderToString(<>Ʊ</>)]: 0x1b1, + [ReactDOM.renderToString(<>Ʋ</>)]: 0x1b2, + [ReactDOM.renderToString(<>Ƴ</>)]: 0x1b3, + [ReactDOM.renderToString(<>ƴ</>)]: 0x1b4, + [ReactDOM.renderToString(<>Ƶ</>)]: 0x1b5, + [ReactDOM.renderToString(<>ƶ</>)]: 0x1b6, + [ReactDOM.renderToString(<>Ʒ</>)]: 0x1b7, + [ReactDOM.renderToString(<>Ƹ</>)]: 0x1b8, + [ReactDOM.renderToString(<>ƹ</>)]: 0x1b9, + [ReactDOM.renderToString(<>ƺ</>)]: 0x1ba, + [ReactDOM.renderToString(<>ƻ</>)]: 0x1bb, + [ReactDOM.renderToString(<>Ƽ</>)]: 0x1bc, + [ReactDOM.renderToString(<>ƽ</>)]: 0x1bd, + [ReactDOM.renderToString(<>ƾ</>)]: 0x1be, + [ReactDOM.renderToString(<>ƿ</>)]: 0x1bf, + [ReactDOM.renderToString(<>ǀ</>)]: 0x1c0, + [ReactDOM.renderToString(<>ǁ</>)]: 0x1c1, + [ReactDOM.renderToString(<>ǂ</>)]: 0x1c2, + [ReactDOM.renderToString(<>ǃ</>)]: 0x1c3, + [ReactDOM.renderToString(<>DŽ</>)]: 0x1c4, + [ReactDOM.renderToString(<>Dž</>)]: 0x1c5, + [ReactDOM.renderToString(<>dž</>)]: 0x1c6, + [ReactDOM.renderToString(<>LJ</>)]: 0x1c7, + [ReactDOM.renderToString(<>Lj</>)]: 0x1c8, + [ReactDOM.renderToString(<>lj</>)]: 0x1c9, + [ReactDOM.renderToString(<>NJ</>)]: 0x1ca, + [ReactDOM.renderToString(<>Nj</>)]: 0x1cb, + [ReactDOM.renderToString(<>nj</>)]: 0x1cc, + [ReactDOM.renderToString(<>Ǎ</>)]: 0x1cd, + [ReactDOM.renderToString(<>ǎ</>)]: 0x1ce, + [ReactDOM.renderToString(<>Ǐ</>)]: 0x1cf, + [ReactDOM.renderToString(<>ǐ</>)]: 0x1d0, + [ReactDOM.renderToString(<>Ǒ</>)]: 0x1d1, + [ReactDOM.renderToString(<>ǒ</>)]: 0x1d2, + [ReactDOM.renderToString(<>Ǔ</>)]: 0x1d3, + [ReactDOM.renderToString(<>ǔ</>)]: 0x1d4, + [ReactDOM.renderToString(<>Ǖ</>)]: 0x1d5, + [ReactDOM.renderToString(<>ǖ</>)]: 0x1d6, + [ReactDOM.renderToString(<>Ǘ</>)]: 0x1d7, + [ReactDOM.renderToString(<>ǘ</>)]: 0x1d8, + [ReactDOM.renderToString(<>Ǚ</>)]: 0x1d9, + [ReactDOM.renderToString(<>ǚ</>)]: 0x1da, + [ReactDOM.renderToString(<>Ǜ</>)]: 0x1db, + [ReactDOM.renderToString(<>ǜ</>)]: 0x1dc, + [ReactDOM.renderToString(<>ǝ</>)]: 0x1dd, + [ReactDOM.renderToString(<>Ǟ</>)]: 0x1de, + [ReactDOM.renderToString(<>ǟ</>)]: 0x1df, + [ReactDOM.renderToString(<>Ǡ</>)]: 0x1e0, + [ReactDOM.renderToString(<>ǡ</>)]: 0x1e1, + [ReactDOM.renderToString(<>Ǣ</>)]: 0x1e2, + [ReactDOM.renderToString(<>ǣ</>)]: 0x1e3, + [ReactDOM.renderToString(<>Ǥ</>)]: 0x1e4, + [ReactDOM.renderToString(<>ǥ</>)]: 0x1e5, + [ReactDOM.renderToString(<>Ǧ</>)]: 0x1e6, + [ReactDOM.renderToString(<>ǧ</>)]: 0x1e7, + [ReactDOM.renderToString(<>Ǩ</>)]: 0x1e8, + [ReactDOM.renderToString(<>ǩ</>)]: 0x1e9, + [ReactDOM.renderToString(<>Ǫ</>)]: 0x1ea, + [ReactDOM.renderToString(<>ǫ</>)]: 0x1eb, + [ReactDOM.renderToString(<>Ǭ</>)]: 0x1ec, + [ReactDOM.renderToString(<>ǭ</>)]: 0x1ed, + [ReactDOM.renderToString(<>Ǯ</>)]: 0x1ee, + [ReactDOM.renderToString(<>ǯ</>)]: 0x1ef, + [ReactDOM.renderToString(<>ǰ</>)]: 0x1f0, + [ReactDOM.renderToString(<>DZ</>)]: 0x1f1, + [ReactDOM.renderToString(<>Dz</>)]: 0x1f2, + [ReactDOM.renderToString(<>dz</>)]: 0x1f3, + [ReactDOM.renderToString(<>Ǵ</>)]: 0x1f4, + [ReactDOM.renderToString(<>ǵ</>)]: 0x1f5, + [ReactDOM.renderToString(<>Ƕ</>)]: 0x1f6, + [ReactDOM.renderToString(<>Ƿ</>)]: 0x1f7, + [ReactDOM.renderToString(<>Ǹ</>)]: 0x1f8, + [ReactDOM.renderToString(<>ǹ</>)]: 0x1f9, + [ReactDOM.renderToString(<>Ǻ</>)]: 0x1fa, + [ReactDOM.renderToString(<>ǻ</>)]: 0x1fb, + [ReactDOM.renderToString(<>Ǽ</>)]: 0x1fc, + [ReactDOM.renderToString(<>ǽ</>)]: 0x1fd, + [ReactDOM.renderToString(<>Ǿ</>)]: 0x1fe, + [ReactDOM.renderToString(<>ǿ</>)]: 0x1ff, + [ReactDOM.renderToString(<>Ȁ</>)]: 0x200, + [ReactDOM.renderToString(<>ȁ</>)]: 0x201, + [ReactDOM.renderToString(<>Ȃ</>)]: 0x202, + [ReactDOM.renderToString(<>ȃ</>)]: 0x203, + [ReactDOM.renderToString(<>Ȅ</>)]: 0x204, + [ReactDOM.renderToString(<>ȅ</>)]: 0x205, + [ReactDOM.renderToString(<>Ȇ</>)]: 0x206, + [ReactDOM.renderToString(<>ȇ</>)]: 0x207, + [ReactDOM.renderToString(<>Ȉ</>)]: 0x208, + [ReactDOM.renderToString(<>ȉ</>)]: 0x209, + [ReactDOM.renderToString(<>Ȋ</>)]: 0x20a, + [ReactDOM.renderToString(<>ȋ</>)]: 0x20b, + [ReactDOM.renderToString(<>Ȍ</>)]: 0x20c, + [ReactDOM.renderToString(<>ȍ</>)]: 0x20d, + [ReactDOM.renderToString(<>Ȏ</>)]: 0x20e, + [ReactDOM.renderToString(<>ȏ</>)]: 0x20f, + [ReactDOM.renderToString(<>Ȑ</>)]: 0x210, + [ReactDOM.renderToString(<>ȑ</>)]: 0x211, + [ReactDOM.renderToString(<>Ȓ</>)]: 0x212, + [ReactDOM.renderToString(<>ȓ</>)]: 0x213, + [ReactDOM.renderToString(<>Ȕ</>)]: 0x214, + [ReactDOM.renderToString(<>ȕ</>)]: 0x215, + [ReactDOM.renderToString(<>Ȗ</>)]: 0x216, + [ReactDOM.renderToString(<>ȗ</>)]: 0x217, + [ReactDOM.renderToString(<>Ș</>)]: 0x218, + [ReactDOM.renderToString(<>ș</>)]: 0x219, + [ReactDOM.renderToString(<>Ț</>)]: 0x21a, + [ReactDOM.renderToString(<>ț</>)]: 0x21b, + [ReactDOM.renderToString(<>Ȝ</>)]: 0x21c, + [ReactDOM.renderToString(<>ȝ</>)]: 0x21d, + [ReactDOM.renderToString(<>Ȟ</>)]: 0x21e, + [ReactDOM.renderToString(<>ȟ</>)]: 0x21f, + [ReactDOM.renderToString(<>Ƞ</>)]: 0x220, + [ReactDOM.renderToString(<>ȡ</>)]: 0x221, + [ReactDOM.renderToString(<>Ȣ</>)]: 0x222, + [ReactDOM.renderToString(<>ȣ</>)]: 0x223, + [ReactDOM.renderToString(<>Ȥ</>)]: 0x224, + [ReactDOM.renderToString(<>ȥ</>)]: 0x225, + [ReactDOM.renderToString(<>Ȧ</>)]: 0x226, + [ReactDOM.renderToString(<>ȧ</>)]: 0x227, + [ReactDOM.renderToString(<>Ȩ</>)]: 0x228, + [ReactDOM.renderToString(<>ȩ</>)]: 0x229, + [ReactDOM.renderToString(<>Ȫ</>)]: 0x22a, + [ReactDOM.renderToString(<>ȫ</>)]: 0x22b, + [ReactDOM.renderToString(<>Ȭ</>)]: 0x22c, + [ReactDOM.renderToString(<>ȭ</>)]: 0x22d, + [ReactDOM.renderToString(<>Ȯ</>)]: 0x22e, + [ReactDOM.renderToString(<>ȯ</>)]: 0x22f, + [ReactDOM.renderToString(<>Ȱ</>)]: 0x230, + [ReactDOM.renderToString(<>ȱ</>)]: 0x231, + [ReactDOM.renderToString(<>Ȳ</>)]: 0x232, + [ReactDOM.renderToString(<>ȳ</>)]: 0x233, + [ReactDOM.renderToString(<>ȴ</>)]: 0x234, + [ReactDOM.renderToString(<>ȵ</>)]: 0x235, + [ReactDOM.renderToString(<>ȶ</>)]: 0x236, + [ReactDOM.renderToString(<>ȷ</>)]: 0x237, + [ReactDOM.renderToString(<>ȸ</>)]: 0x238, + [ReactDOM.renderToString(<>ȹ</>)]: 0x239, + [ReactDOM.renderToString(<>Ⱥ</>)]: 0x23a, + [ReactDOM.renderToString(<>Ȼ</>)]: 0x23b, + [ReactDOM.renderToString(<>ȼ</>)]: 0x23c, + [ReactDOM.renderToString(<>Ƚ</>)]: 0x23d, + [ReactDOM.renderToString(<>Ⱦ</>)]: 0x23e, + [ReactDOM.renderToString(<>ȿ</>)]: 0x23f, + [ReactDOM.renderToString(<>ɀ</>)]: 0x240, + [ReactDOM.renderToString(<>Ɂ</>)]: 0x241, + [ReactDOM.renderToString(<>ɂ</>)]: 0x242, + [ReactDOM.renderToString(<>Ƀ</>)]: 0x243, + [ReactDOM.renderToString(<>Ʉ</>)]: 0x244, + [ReactDOM.renderToString(<>Ʌ</>)]: 0x245, + [ReactDOM.renderToString(<>Ɇ</>)]: 0x246, + [ReactDOM.renderToString(<>ɇ</>)]: 0x247, + [ReactDOM.renderToString(<>Ɉ</>)]: 0x248, + [ReactDOM.renderToString(<>ɉ</>)]: 0x249, + [ReactDOM.renderToString(<>Ɋ</>)]: 0x24a, + [ReactDOM.renderToString(<>ɋ</>)]: 0x24b, + [ReactDOM.renderToString(<>Ɍ</>)]: 0x24c, + [ReactDOM.renderToString(<>ɍ</>)]: 0x24d, + [ReactDOM.renderToString(<>Ɏ</>)]: 0x24e, + [ReactDOM.renderToString(<>ɏ</>)]: 0x24f, + [ReactDOM.renderToString(<>ɐ</>)]: 0x250, + [ReactDOM.renderToString(<>ɑ</>)]: 0x251, + [ReactDOM.renderToString(<>ɒ</>)]: 0x252, + [ReactDOM.renderToString(<>ɓ</>)]: 0x253, + [ReactDOM.renderToString(<>ɔ</>)]: 0x254, + [ReactDOM.renderToString(<>ɕ</>)]: 0x255, + [ReactDOM.renderToString(<>ɖ</>)]: 0x256, + [ReactDOM.renderToString(<>ɗ</>)]: 0x257, + [ReactDOM.renderToString(<>ɘ</>)]: 0x258, + [ReactDOM.renderToString(<>ə</>)]: 0x259, + [ReactDOM.renderToString(<>ɚ</>)]: 0x25a, + [ReactDOM.renderToString(<>ɛ</>)]: 0x25b, + [ReactDOM.renderToString(<>ɜ</>)]: 0x25c, + [ReactDOM.renderToString(<>ɝ</>)]: 0x25d, + [ReactDOM.renderToString(<>ɞ</>)]: 0x25e, + [ReactDOM.renderToString(<>ɟ</>)]: 0x25f, + [ReactDOM.renderToString(<>ɠ</>)]: 0x260, + [ReactDOM.renderToString(<>ɡ</>)]: 0x261, + [ReactDOM.renderToString(<>ɢ</>)]: 0x262, + [ReactDOM.renderToString(<>ɣ</>)]: 0x263, + [ReactDOM.renderToString(<>ɤ</>)]: 0x264, + [ReactDOM.renderToString(<>ɥ</>)]: 0x265, + [ReactDOM.renderToString(<>ɦ</>)]: 0x266, + [ReactDOM.renderToString(<>ɧ</>)]: 0x267, + [ReactDOM.renderToString(<>ɨ</>)]: 0x268, + [ReactDOM.renderToString(<>ɩ</>)]: 0x269, + [ReactDOM.renderToString(<>ɪ</>)]: 0x26a, + [ReactDOM.renderToString(<>ɫ</>)]: 0x26b, + [ReactDOM.renderToString(<>ɬ</>)]: 0x26c, + [ReactDOM.renderToString(<>ɭ</>)]: 0x26d, + [ReactDOM.renderToString(<>ɮ</>)]: 0x26e, + [ReactDOM.renderToString(<>ɯ</>)]: 0x26f, + [ReactDOM.renderToString(<>ɰ</>)]: 0x270, + [ReactDOM.renderToString(<>ɱ</>)]: 0x271, + [ReactDOM.renderToString(<>ɲ</>)]: 0x272, + [ReactDOM.renderToString(<>ɳ</>)]: 0x273, + [ReactDOM.renderToString(<>ɴ</>)]: 0x274, + [ReactDOM.renderToString(<>ɵ</>)]: 0x275, + [ReactDOM.renderToString(<>ɶ</>)]: 0x276, + [ReactDOM.renderToString(<>ɷ</>)]: 0x277, + [ReactDOM.renderToString(<>ɸ</>)]: 0x278, + [ReactDOM.renderToString(<>ɹ</>)]: 0x279, + [ReactDOM.renderToString(<>ɺ</>)]: 0x27a, + [ReactDOM.renderToString(<>ɻ</>)]: 0x27b, + [ReactDOM.renderToString(<>ɼ</>)]: 0x27c, + [ReactDOM.renderToString(<>ɽ</>)]: 0x27d, + [ReactDOM.renderToString(<>ɾ</>)]: 0x27e, + [ReactDOM.renderToString(<>ɿ</>)]: 0x27f, + [ReactDOM.renderToString(<>ʀ</>)]: 0x280, + [ReactDOM.renderToString(<>ʁ</>)]: 0x281, + [ReactDOM.renderToString(<>ʂ</>)]: 0x282, + [ReactDOM.renderToString(<>ʃ</>)]: 0x283, + [ReactDOM.renderToString(<>ʄ</>)]: 0x284, + [ReactDOM.renderToString(<>ʅ</>)]: 0x285, + [ReactDOM.renderToString(<>ʆ</>)]: 0x286, + [ReactDOM.renderToString(<>ʇ</>)]: 0x287, + [ReactDOM.renderToString(<>ʈ</>)]: 0x288, + [ReactDOM.renderToString(<>ʉ</>)]: 0x289, + [ReactDOM.renderToString(<>ʊ</>)]: 0x28a, + [ReactDOM.renderToString(<>ʋ</>)]: 0x28b, + [ReactDOM.renderToString(<>ʌ</>)]: 0x28c, + [ReactDOM.renderToString(<>ʍ</>)]: 0x28d, + [ReactDOM.renderToString(<>ʎ</>)]: 0x28e, + [ReactDOM.renderToString(<>ʏ</>)]: 0x28f, + [ReactDOM.renderToString(<>ʐ</>)]: 0x290, + [ReactDOM.renderToString(<>ʑ</>)]: 0x291, + [ReactDOM.renderToString(<>ʒ</>)]: 0x292, + [ReactDOM.renderToString(<>ʓ</>)]: 0x293, + [ReactDOM.renderToString(<>ʔ</>)]: 0x294, +}; + +export function test() { + for (let rawKey in elements) { + var key = rawKey; + if (rawKey.startsWith("&")) { + var txt = document.createElement("textarea"); + txt.innerHTML = rawKey; + key = txt.value; + } + + console.assert( + elements[rawKey] === key.codePointAt(0), + `${key} is not ${elements[rawKey]}` + ); + } + + return testDone(import.meta.url); +} diff --git a/test/snippets/jsx-spacing.js b/test/snippets/jsx-spacing.js new file mode 100644 index 000000000..9b9f28a33 --- /dev/null +++ b/test/snippets/jsx-spacing.js @@ -0,0 +1,29 @@ +"use strict"; +exports.__esModule = true; +exports.test = void 0; +var ReactDOM = require("react-dom/server"); +var ReturnDescriptionAsString = function (_a) { + var description = _a.description; + return description; +}; +function test() { + var _bun = ReactDOM.renderToString(<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 +"></ReturnDescriptionAsString>); + // convert HTML entities to unicode + var el = document.createElement("textarea"); + el.innerHTML = _bun; + var bun = el.value; + var esbuild = "line1\nline2 trailing space \n\nline4 no trailing space 'single quote' \\t\\f\\v\\uF000 `template string`\n\nline6 no trailing space\nline7 trailing newline that ${terminates} the string literal\n"; + console.assert(bun === esbuild, "strings did not match: " + JSON.stringify({ + received: bun, + expected: esbuild + }, null, 2)); + testDone(import.meta.url); +} +exports.test = test; diff --git a/test/snippets/jsx-spacing.jsx b/test/snippets/jsx-spacing.jsx new file mode 100644 index 000000000..b6d13f97a --- /dev/null +++ b/test/snippets/jsx-spacing.jsx @@ -0,0 +1,43 @@ +import * as ReactDOM from "react-dom/server"; + +const ReturnDescriptionAsString = ({ description }) => description; + +export function test() { + const _bun = ReactDOM.renderToString( + <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 +" + ></ReturnDescriptionAsString> + ); + + // convert HTML entities to unicode + const el = document.createElement("textarea"); + el.innerHTML = _bun; + const bun = el.value; + + const esbuild = + "line1\nline2 trailing space \n\nline4 no trailing space 'single quote' \\t\\f\\v\\uF000 `template string`\n\nline6 no trailing space\nline7 trailing newline that ${terminates} the string literal\n"; + + const tsc = + "line1\nline2 trailing space \n\nline4 no trailing space 'single quote' \\t\\f\\v\\uF000 `template string`\n\nline6 no trailing space\nline7 trailing newline that ${terminates} the string literal\n"; + + console.assert( + bun === esbuild && bun === tsc, + `strings did not match: ${JSON.stringify( + { + received: bun, + expected: esbuild, + }, + null, + 2 + )}` + ); + + testDone(import.meta.url); +} diff --git a/test/snippets/jsx-top-level.tsx b/test/snippets/jsx-top-level.tsx new file mode 100644 index 000000000..2b49b5959 --- /dev/null +++ b/test/snippets/jsx-top-level.tsx @@ -0,0 +1,21 @@ +const isDropdown = true; +const iconName = ""; +const adjustedPadding = 5; + +const Icon = ({ name, size, color }) => { + return name; +}; + +const Foo = <Icon name="arrow-down" size="1.5em" color="currentColor" />; +const yoooo = [<Icon name="arrow-down" size="1.5em" color="currentColor" />]; +const iconProps = { + // This regression test is to ensure that the JSX value here does not print as an e_missing (nothing) + rightIcon: <Icon name="arrow-down" size="1.5em" color="currentColor" />, + paddingRight: adjustedPadding, +}; + +export function test() { + const foo = iconProps.rightIcon; + yoooo[0]; + return testDone(import.meta.url); +} diff --git a/test/snippets/latin1-chars-in-regexp.js b/test/snippets/latin1-chars-in-regexp.js new file mode 100644 index 000000000..e4d613f5e --- /dev/null +++ b/test/snippets/latin1-chars-in-regexp.js @@ -0,0 +1,70 @@ +// original code: +// var re_btou = new RegExp( +// [ +// "[\xC0-\xDF][\x80-\xBF]", +// "[\xE0-\xEF][\x80-\xBF]{2}", +// "[\xF0-\xF7][\x80-\xBF]{3}", +// ].join("|"), +// "g" +// ); + +export var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; +export var re_btou = new RegExp( + [ + "[\xC0-\xDF][\x80-\xBF]", + "[\xE0-\xEF][\x80-\xBF]{2}", + "[\xF0-\xF7][\x80-\xBF]{3}", + ].join("|"), + "g" +); + +const encoder = new TextEncoder(); +const realLines = [ + "[\xC0-\xDF][\x80-\xBF]", + "[\xE0-\xEF][\x80-\xBF]{2}", + "[\xF0-\xF7][\x80-\xBF]{3}", +]; +const real = realLines.map((input) => Array.from(encoder.encode(input))); + +const expected = [ + [91, 195, 128, 45, 195, 159, 93, 91, 194, 128, 45, 194, 191, 93], + [ + 91, 195, 160, 45, 195, 175, 93, 91, 194, 128, 45, 194, 191, 93, 123, 50, + 125, + ], + [ + 91, 195, 176, 45, 195, 183, 93, 91, 194, 128, 45, 194, 191, 93, 123, 51, + 125, + ], +]; + +const newlinePreserved = `\n`; + +export function test() { + if ( + !real.every((point, i) => point.every((val, j) => val === expected[i][j])) + ) { + throw new Error( + `test failed +${JSON.stringify({ expected, real }, null, 2)}` + ); + } + + if (newlinePreserved.length !== 1 || newlinePreserved.charCodeAt(0) !== 10) { + throw new Error("Newline was not preserved"); + } + + const decoder = new TextDecoder("utf8"); + if ( + !realLines.every( + (line, i) => decoder.decode(Uint8Array.from(expected[i])) === line + ) + ) { + throw new Error( + `test failed. Lines did not match. +${JSON.stringify({ expected, real }, null, 2)}` + ); + } + + testDone(import.meta.url); +} diff --git a/test/snippets/lodash-regexp.js b/test/snippets/lodash-regexp.js new file mode 100644 index 000000000..bc683e535 --- /dev/null +++ b/test/snippets/lodash-regexp.js @@ -0,0 +1,24 @@ +import { shuffle } from "lodash"; + +// Lodash uses a variety of uncommon syntax (such as unicode escapes in regexp) +// so running it is a broad test of the parser, lexer, and printer +export function test() { + const foo = [1, 2, 3, 4, 6]; + const bar = shuffle(foo); + console.assert(bar !== foo); + console.assert(bar.length === foo.length); + bar.sort(); + foo.sort(); + for (let i = 0; i < bar.length; i++) { + console.assert(bar[i] === foo[i], "expected " + i + " to be " + foo[i]); + console.assert(typeof bar[i] === "number"); + console.assert(typeof foo[i] === "number"); + } + + return testDone(import.meta.url); +} + +// export function test() { +// const regexp = RegExp("['\u2019]", "g"); +// return testDone(import.meta.url); +// } diff --git a/test/snippets/multiple-imports.js b/test/snippets/multiple-imports.js new file mode 100644 index 000000000..320d0105e --- /dev/null +++ b/test/snippets/multiple-imports.js @@ -0,0 +1,13 @@ +import React from "react"; +import React2 from "react"; + +const bacon = React; +const bacon2 = <>hello</>; + +export function test() { + console.assert(bacon === React); + console.assert(bacon === React2); + console.assert(typeof bacon2 !== "undefined"); + console.assert(React.isValidElement(bacon2)); + return testDone(import.meta.url); +} diff --git a/test/snippets/multiple-var.js b/test/snippets/multiple-var.js new file mode 100644 index 000000000..527634a00 --- /dev/null +++ b/test/snippets/multiple-var.js @@ -0,0 +1,11 @@ +var foo = true; + +globalThis.TRUE_BUT_WE_CANT_TREESHAKE_IT = true; +if (globalThis.TRUE_BUT_WE_CANT_TREESHAKE_IT) { + var { foo } = { foo: false }; +} + +export function test() { + console.assert(foo === false, "foo should be false"); + return testDone(import.meta.url); +} diff --git a/test/snippets/number-literal-bug.js b/test/snippets/number-literal-bug.js new file mode 100644 index 000000000..cb6990348 --- /dev/null +++ b/test/snippets/number-literal-bug.js @@ -0,0 +1,11 @@ +// test that we don't call functions on number literals +export function test() { + const precision = 10; + try { + parseFloat((0.0).toPrecision(precision) + "1"); + } catch (exception) { + throw new Error("Test Failed", exception); + } + + testDone(import.meta.url); +} diff --git a/test/snippets/optional-chain-with-function.js b/test/snippets/optional-chain-with-function.js new file mode 100644 index 000000000..82ad51d46 --- /dev/null +++ b/test/snippets/optional-chain-with-function.js @@ -0,0 +1,15 @@ +export function test() { + try { + const multipleSecondaryValues = undefined; + const ratings = ["123"]; + + var bar = multipleSecondaryValues?.map((value) => false); + bar = bar?.multipleSecondaryValues?.map((value) => false); + bar = bar?.bar?.multipleSecondaryValues?.map((value) => false); + bar = {}?.bar?.multipleSecondaryValues?.map((value) => false); + } catch (e) { + throw e; + } + + return testDone(import.meta.url); +} diff --git a/test/snippets/package-json-exports/_node_modules_copy/exact/im-exact.js b/test/snippets/package-json-exports/_node_modules_copy/exact/im-exact.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/exact/im-exact.js diff --git a/test/snippets/package-json-exports/_node_modules_copy/exact/package.json b/test/snippets/package-json-exports/_node_modules_copy/exact/package.json new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/exact/package.json diff --git a/test/snippets/package-json-exports/_node_modules_copy/inexact/browser/dir/file.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/browser/dir/file.js new file mode 100644 index 000000000..26ab53d5b --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/inexact/browser/dir/file.js @@ -0,0 +1 @@ +export const target = "browser"; diff --git a/test/snippets/package-json-exports/_node_modules_copy/inexact/browser/dir/foo.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/browser/dir/foo.js new file mode 100644 index 000000000..e54d9d4d6 --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/inexact/browser/dir/foo.js @@ -0,0 +1 @@ +export const target = 'browser';
\ No newline at end of file diff --git a/test/snippets/package-json-exports/_node_modules_copy/inexact/browser/foo.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/browser/foo.js new file mode 100644 index 000000000..e54d9d4d6 --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/inexact/browser/foo.js @@ -0,0 +1 @@ +export const target = 'browser';
\ No newline at end of file diff --git a/test/snippets/package-json-exports/_node_modules_copy/inexact/browser/index.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/browser/index.js new file mode 100644 index 000000000..e54d9d4d6 --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/inexact/browser/index.js @@ -0,0 +1 @@ +export const target = 'browser';
\ No newline at end of file diff --git a/test/snippets/package-json-exports/_node_modules_copy/inexact/default/dir/file.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/default/dir/file.js new file mode 100644 index 000000000..826077c96 --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/inexact/default/dir/file.js @@ -0,0 +1 @@ +export const target = "default"; diff --git a/test/snippets/package-json-exports/_node_modules_copy/inexact/default/dir/foo.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/default/dir/foo.js new file mode 100644 index 000000000..826077c96 --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/inexact/default/dir/foo.js @@ -0,0 +1 @@ +export const target = "default"; diff --git a/test/snippets/package-json-exports/_node_modules_copy/inexact/default/foo.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/default/foo.js new file mode 100644 index 000000000..8fb5eac0c --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/inexact/default/foo.js @@ -0,0 +1 @@ +export const target = 'default'; diff --git a/test/snippets/package-json-exports/_node_modules_copy/inexact/default/index.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/default/index.js new file mode 100644 index 000000000..826077c96 --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/inexact/default/index.js @@ -0,0 +1 @@ +export const target = "default"; diff --git a/test/snippets/package-json-exports/_node_modules_copy/inexact/node/dir/file.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/node/dir/file.js new file mode 100644 index 000000000..301a88090 --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/inexact/node/dir/file.js @@ -0,0 +1 @@ +export const target = "node"; diff --git a/test/snippets/package-json-exports/_node_modules_copy/inexact/node/dir/foo.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/node/dir/foo.js new file mode 100644 index 000000000..301a88090 --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/inexact/node/dir/foo.js @@ -0,0 +1 @@ +export const target = "node"; diff --git a/test/snippets/package-json-exports/_node_modules_copy/inexact/node/foo.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/node/foo.js new file mode 100644 index 000000000..b9504cdf9 --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/inexact/node/foo.js @@ -0,0 +1 @@ +export const target = 'node';
\ No newline at end of file diff --git a/test/snippets/package-json-exports/_node_modules_copy/inexact/node/index.js b/test/snippets/package-json-exports/_node_modules_copy/inexact/node/index.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/inexact/node/index.js diff --git a/test/snippets/package-json-exports/_node_modules_copy/inexact/package.json b/test/snippets/package-json-exports/_node_modules_copy/inexact/package.json new file mode 100644 index 000000000..1c9b5185d --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/inexact/package.json @@ -0,0 +1,20 @@ +{ + "name": "inexact", + "exports": { + ".": { + "node": "./node/index.js", + "browser": "./browser/index.js", + "default": "./default/index.js" + }, + "./foo": { + "node": "./node/foo.js", + "browser": "./browser/foo.js", + "default": "./default/foo.js" + }, + "./": { + "node": "./node/dir/", + "browser": "./browser/dir/", + "default": "./default/dir/" + } + } +} diff --git a/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/dir/file.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/dir/file.js new file mode 100644 index 000000000..26ab53d5b --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/dir/file.js @@ -0,0 +1 @@ +export const target = "browser"; diff --git a/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/dir/foo.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/dir/foo.js new file mode 100644 index 000000000..e54d9d4d6 --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/dir/foo.js @@ -0,0 +1 @@ +export const target = 'browser';
\ No newline at end of file diff --git a/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/foo.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/foo.js new file mode 100644 index 000000000..e54d9d4d6 --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/foo.js @@ -0,0 +1 @@ +export const target = 'browser';
\ No newline at end of file diff --git a/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/index.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/index.js new file mode 100644 index 000000000..e54d9d4d6 --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/index.js @@ -0,0 +1 @@ +export const target = 'browser';
\ No newline at end of file diff --git a/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/js-file.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/js-file.js new file mode 100644 index 000000000..ff519c58f --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/js-file.js @@ -0,0 +1 @@ +export const isJS = true; diff --git a/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/js-file.ts b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/js-file.ts new file mode 100644 index 000000000..26ab53d5b --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/browser/js-file.ts @@ -0,0 +1 @@ +export const target = "browser"; diff --git a/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/dir/file.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/dir/file.js new file mode 100644 index 000000000..826077c96 --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/dir/file.js @@ -0,0 +1 @@ +export const target = "default"; diff --git a/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/dir/foo.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/dir/foo.js new file mode 100644 index 000000000..826077c96 --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/dir/foo.js @@ -0,0 +1 @@ +export const target = "default"; diff --git a/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/foo.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/foo.js new file mode 100644 index 000000000..8fb5eac0c --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/foo.js @@ -0,0 +1 @@ +export const target = 'default'; diff --git a/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/index.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/index.js new file mode 100644 index 000000000..826077c96 --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/default/index.js @@ -0,0 +1 @@ +export const target = "default"; diff --git a/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/dir/file.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/dir/file.js new file mode 100644 index 000000000..301a88090 --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/dir/file.js @@ -0,0 +1 @@ +export const target = "node"; diff --git a/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/dir/foo.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/dir/foo.js new file mode 100644 index 000000000..301a88090 --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/dir/foo.js @@ -0,0 +1 @@ +export const target = "node"; diff --git a/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/foo.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/foo.js new file mode 100644 index 000000000..b9504cdf9 --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/foo.js @@ -0,0 +1 @@ +export const target = 'node';
\ No newline at end of file diff --git a/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/index.js b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/index.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/node/index.js diff --git a/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/package.json b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/package.json new file mode 100644 index 000000000..baeb185d9 --- /dev/null +++ b/test/snippets/package-json-exports/_node_modules_copy/js-only-exports/package.json @@ -0,0 +1,10 @@ +{ + "name": "js-only-exports", + "exports": { + "./*": { + "node": "./node/*.js", + "browser": "./browser/*.js", + "default": "./default/*.js" + } + } +} diff --git a/test/snippets/package-json-exports/index.js b/test/snippets/package-json-exports/index.js new file mode 100644 index 000000000..d1946c53f --- /dev/null +++ b/test/snippets/package-json-exports/index.js @@ -0,0 +1,12 @@ +import * as InexactRoot from "inexact"; +import * as InexactFile from "inexact/file"; +import * as ExactFile from "inexact/foo"; +import * as JSFileExtensionOnly from "js-only-exports/js-file"; + +export async function test() { + console.assert(InexactRoot.target === "browser"); + console.assert(InexactFile.target === "browser"); + console.assert(ExactFile.target === "browser"); + console.assert(JSFileExtensionOnly.isJS === true); + return testDone(import.meta.url); +} diff --git a/test/snippets/package-json-exports/package.json b/test/snippets/package-json-exports/package.json new file mode 100644 index 000000000..233a02208 --- /dev/null +++ b/test/snippets/package-json-exports/package.json @@ -0,0 +1,3 @@ +{ + "name": "package-json-exports" +} diff --git a/test/snippets/package-json-utf8.js b/test/snippets/package-json-utf8.js new file mode 100644 index 000000000..a51fbb886 --- /dev/null +++ b/test/snippets/package-json-utf8.js @@ -0,0 +1,6 @@ +import pkg from "./utf8-package-json.json"; + +export function test() { + console.assert(!!pkg.author); + return testDone(import.meta.url); +} diff --git a/test/snippets/package.json b/test/snippets/package.json new file mode 100644 index 000000000..07b349f86 --- /dev/null +++ b/test/snippets/package.json @@ -0,0 +1,13 @@ +{ + "name": "snippets", + "license": "MIT", + "dependencies": { + "@emotion/core": "^11.0.0", + "@emotion/react": "^11.4.1", + "lodash": "^4.17.21", + "react": "^17.0.2", + "react-dom": "^17.0.2", + "redux": "^4.1.1", + "styled-components": "^5.3.1" + } +} diff --git a/test/snippets/public/index.html b/test/snippets/public/index.html new file mode 100644 index 000000000..225c98d52 --- /dev/null +++ b/test/snippets/public/index.html @@ -0,0 +1,91 @@ +<html> + <head> + <meta charset="utf-8" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <title>bun Test</title> + </head> + <body> + <script type="module"> + globalThis.console.assert = (condition, ...content) => { + if (!condition) { + throw new Error(content.join(" ")); + } + }; + globalThis.getModuleScriptSrc = async (name) => { + const response = await fetch(name, { + cache: "force-cache", + }); + + if (response.ok) { + return await response.text(); + } else { + throw new Error(`Failed to get module script ${name}`); + } + }; + + globalThis.runTest = async (name) => { + var Namespace = await import(name); + var testFunction = Namespace.test; + + if ( + !("test" in Namespace) && + "default" in Namespace && + typeof Namespace.default === "function" + ) { + Namespace = Namespace.default(); + testFunction = Namespace.test; + } + + if (!testFunction) { + throw new Error("No test function found in " + name); + } + + if (typeof testFunction !== "function") { + throw new Error( + `Expected (await import(\"${name}\"")) to have a test function.\nReceived: ${Object.keys( + Namespace + ).join(", ")} ` + ); + } + + 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( + globalThis.location.pathname.substring( + 0, + location.pathname.length - "-test".length + ) + ).then( + () => {}, + (err) => { + console.error(err); + alert(err.toString()); + } + ); + } + </script> + </body> +</html> diff --git a/test/snippets/react-context-value-func.tsx b/test/snippets/react-context-value-func.tsx new file mode 100644 index 000000000..5f38a5d1c --- /dev/null +++ b/test/snippets/react-context-value-func.tsx @@ -0,0 +1,34 @@ +import React from "react"; + +const Context = React.createContext({}); + +const ContextProvider = ({ children }) => { + const [cb, setCB] = React.useState(function () {}); + const foo = true; + + return <Context.Provider value={cb}>{children(foo)}</Context.Provider>; +}; + +const ContextValue = ({}) => ( + <Context.Consumer> + {(foo) => { + if (foo) { + return <div>Worked!</div>; + } + + throw `Value "${foo}"" should be true`; + }} + </Context.Consumer> +); + +const TestComponent = () => ( + <ContextProvider> + <ContextValue /> + </ContextProvider> +); + +export function test() { + const foo = <TestComponent />; + + return testDone(import.meta.url); +} diff --git a/test/snippets/segfault.js b/test/snippets/segfault.js new file mode 100644 index 000000000..59b030b4d --- /dev/null +++ b/test/snippets/segfault.js @@ -0,0 +1 @@ +Bun.unsafe.segfault(); diff --git a/test/snippets/spread_with_key.tsx b/test/snippets/spread_with_key.tsx new file mode 100644 index 000000000..9c26ea5ba --- /dev/null +++ b/test/snippets/spread_with_key.tsx @@ -0,0 +1,20 @@ +import React from "react"; + +export function SpreadWithTheKey({ className }: Props) { + const rest = {}; + return ( + <div + className={className} + key="spread-with-the-key" + {...rest} + onClick={() => console.log("click")} + > + Rendered component containing warning + </div> + ); +} + +export function test() { + console.assert(React.isValidElement(<SpreadWithTheKey className="foo" />)); + return testDone(import.meta.url); +} diff --git a/test/snippets/string-escapes.js b/test/snippets/string-escapes.js new file mode 100644 index 000000000..436140939 --- /dev/null +++ b/test/snippets/string-escapes.js @@ -0,0 +1,129 @@ +// To update this, copy paste the following into the console of the browser +// ------------------------------------------------------------ +var tab = "\t"; +var γ· = "wow"; +var f = ""; +var f = "\u2087"; +var obj = { + "\r\n": "\r\n", + "\n": "\n", + "\t": "\t", + "\f": "\f", + "\v": "\v", + "\u2028": "\u2028", + "\u2029": "\u2029", + "\0": "\0Β null byte", + "π": "π", + "π": "π", + "π΅π½ββοΈ": "π΅π½ββοΈ", + "γ‘": "γ‘", + "βΊ": "βΊ", + γ·: "γ·", + "π": "π", + f: f, + "βΉ": "βΉ", + "β»": "β»", + children: 123, +}; + +const encoder = new TextEncoder(); +const encodedObj = encoder.encode(JSON.stringify(obj)); +// ------------------------------------------------------------ +const correctEncodedObj = [ + 123, 34, 92, 114, 92, 110, 34, 58, 34, 92, 114, 92, 110, 34, 44, 34, 92, 110, + 34, 58, 34, 92, 110, 34, 44, 34, 92, 116, 34, 58, 34, 92, 116, 34, 44, 34, 92, + 102, 34, 58, 34, 92, 102, 34, 44, 34, 92, 117, 48, 48, 48, 98, 34, 58, 34, 92, + 117, 48, 48, 48, 98, 34, 44, 34, 226, 128, 168, 34, 58, 34, 226, 128, 168, 34, + 44, 34, 226, 128, 169, 34, 58, 34, 226, 128, 169, 34, 44, 34, 92, 117, 48, 48, + 48, 48, 34, 58, 34, 92, 117, 48, 48, 48, 48, 194, 160, 110, 117, 108, 108, 32, + 98, 121, 116, 101, 34, 44, 34, 240, 159, 152, 138, 34, 58, 34, 240, 159, 152, + 138, 34, 44, 34, 240, 159, 152, 131, 34, 58, 34, 240, 159, 152, 131, 34, 44, + 34, 240, 159, 149, 181, 240, 159, 143, 189, 226, 128, 141, 226, 153, 130, 239, + 184, 143, 34, 58, 34, 240, 159, 149, 181, 240, 159, 143, 189, 226, 128, 141, + 226, 153, 130, 239, 184, 143, 34, 44, 34, 227, 139, 161, 34, 58, 34, 227, 139, + 161, 34, 44, 34, 226, 152, 186, 34, 58, 34, 226, 152, 186, 34, 44, 34, 227, + 130, 183, 34, 58, 34, 227, 130, 183, 34, 44, 34, 240, 159, 145, 139, 34, 58, + 34, 240, 159, 145, 139, 34, 44, 34, 102, 34, 58, 34, 226, 130, 135, 34, 44, + 34, 226, 152, 185, 34, 58, 34, 226, 152, 185, 34, 44, 34, 226, 152, 187, 34, + 58, 34, 226, 152, 187, 34, 44, 34, 99, 104, 105, 108, 100, 114, 101, 110, 34, + 58, 49, 50, 51, 125, +]; + +export const jsxVariants = ( + <> + "\r\n": "\r\n", "\n": "\n", "\t": "\t", "\f": "\f", "\v": "\v", "\u2028": + "\u2028", "\u2029": "\u2029", "π": "π", "π": "π", "π΅π½ββοΈ": "π΅π½ββοΈ", "γ‘": + "γ‘", "βΊ": "βΊ", γ·: "γ·", "π": "π", f: f, "βΉ": "βΉ", "β»": "β»", children: + 123, + <div data="\r\n" /> + <div data="\n" /> + <div data="\t" /> + <div data="\f" /> + <div data="\v" /> + <div data="\u2028" /> + <div data="\u2029" /> + <div data="π" /> + <div data="π" /> + <div data="π΅π½ββοΈ" /> + <div data="γ‘" /> + <div data="βΊ" /> + <div data="γ·" /> + <div data="π" /> + <div data="βΉ" /> + <div data="β»" /> + <div data="123" /> + <div key="\r\n" /> + <div>\r\n</div> + <div key="\n" /> + <div>\n</div> + <div key="\t" /> + <div>\t</div> + <div key="\f" /> + <div>\f</div> + <div key="\v" /> + <div>\v</div> + <div key="\u2028" /> + <div>\u2028</div> + <div key="\u2029" /> + <div>\u2029</div> + <div key="π" /> + <div>π</div> + <div key="π" /> + <div>π</div> + <div key="π΅π½ββοΈ" /> + <div>π΅π½ββοΈ</div> + <div key="γ‘" /> + <div>γ‘</div> + <div key="βΊ" /> + <div>βΊ</div> + <div key="γ·" /> + <div>γ·</div> + <div key="π" /> + <div>π</div> + <div key="βΉ" /> + <div>βΉ</div> + <div key="β»" /> + <div>β»</div> + <div key="123" /> + <div>123</div> + </> +); + +const foo = () => {}; +const Bar = foo("a", { + children: 123, +}); + +const carriage = obj["\r\n"]; +const newline = obj["\n"]; + +export { obj }; + +export function test() { + console.assert(carriage === "\r\n"); + console.assert(newline === "\n"); + console.assert(tab === "\t"); + console.assert(correctEncodedObj.length === encodedObj.length); + console.assert(correctEncodedObj.every((v, i) => v === encodedObj[i])); + return testDone(import.meta.url); +} diff --git a/test/snippets/styledcomponents-output.js b/test/snippets/styledcomponents-output.js new file mode 100644 index 000000000..a79b5e24d --- /dev/null +++ b/test/snippets/styledcomponents-output.js @@ -0,0 +1,63 @@ +import styled from "styled-components"; +import React from "react"; +import ReactDOM from "react-dom"; + +const ErrorScreenRoot = styled.div` + font-family: "Muli", -apple-system, BlinkMacSystemFont, Helvetica, Arial, + sans-serif; + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + background: #fff; + text-align: center; + background-color: #0b2988; + color: #fff; + font-family: "Muli", -apple-system, BlinkMacSystemFont, Helvetica, Arial, + sans-serif; + line-height: 1.5em; + + & > p { + margin-top: 10px; + } + + & a { + color: inherit; + } +`; + +export function test() { + if (typeof window !== "undefined") { + const reactEl = document.createElement("div"); + document.body.appendChild(reactEl); + ReactDOM.render( + <ErrorScreenRoot id="error-el"> + The react child should have this text + </ErrorScreenRoot>, + reactEl + ); + + const style = document.querySelector("style[data-styled]"); + console.assert(style, "style tag should exist"); + console.assert( + style.textContent.split("").every((a) => a.codePointAt(0) < 128), + "style tag should not contain invalid unicode codepoints" + ); + console.assert( + document.querySelector("#error-el").textContent === + "The react child should have this text" + ); + + ReactDOM.unmountComponentAtNode(reactEl); + reactEl.remove(); + style.remove(); + return testDone(import.meta.url); + } + + return testDone(import.meta.url); +} diff --git a/test/snippets/template-literal.js b/test/snippets/template-literal.js new file mode 100644 index 000000000..ff4e08a4d --- /dev/null +++ b/test/snippets/template-literal.js @@ -0,0 +1,51 @@ +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 + +`; + +const templateLiteralWhichDefinesAFunction = ((...args) => + args[args.length - 1]().toString())` + 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"`); + } + + console.assert( + templateLiteralWhichDefinesAFunction.includes("true"), + "Expected fooFunction to include 'true'" + ); + + return testDone(import.meta.url); +} diff --git a/test/snippets/ts-fallback-rewrite-works.ts b/test/snippets/ts-fallback-rewrite-works.ts new file mode 100644 index 000000000..8e6dabcdb --- /dev/null +++ b/test/snippets/ts-fallback-rewrite-works.ts @@ -0,0 +1,5 @@ +// This looks like it does nothing +// But if you import /ts-fallback-rewrite-works.js, it should resolve the import to /ts-fallback-rewrite-works.ts +export function test() { + return testDone(import.meta.url); +} diff --git a/test/snippets/tsx-fallback-rewrite-works.tsx b/test/snippets/tsx-fallback-rewrite-works.tsx new file mode 100644 index 000000000..b18619914 --- /dev/null +++ b/test/snippets/tsx-fallback-rewrite-works.tsx @@ -0,0 +1,5 @@ +// This looks like it does nothing +// But if you import /tsx-fallback-rewrite-works.js, it should resolve the import to /tsx-fallback-rewrite-works.tsx +export function test() { + return testDone(import.meta.url); +} diff --git a/test/snippets/type-only-imports.ts b/test/snippets/type-only-imports.ts new file mode 100644 index 000000000..447f86793 --- /dev/null +++ b/test/snippets/type-only-imports.ts @@ -0,0 +1,12 @@ +import type Bacon from "tree"; +import type { SilentSymbolCollisionsAreOkayInTypeScript } from "./app"; + +export const baconator: Bacon = true; +export const SilentSymbolCollisionsAreOkayInTypeScript: SilentSymbolCollisionsAreOkayInTypeScript = + true; + +export function test() { + console.assert(SilentSymbolCollisionsAreOkayInTypeScript); + console.assert(baconator); + return testDone(import.meta.url); +} diff --git a/test/snippets/unicode-identifiers.js b/test/snippets/unicode-identifiers.js new file mode 100644 index 000000000..5b602f49b --- /dev/null +++ b/test/snippets/unicode-identifiers.js @@ -0,0 +1,15 @@ +var Ξ΅ = 1e-6, + Ξ΅2 = Ξ΅ * Ξ΅, + Ο = Math.PI, + Ο = 2 * Ο, + ΟΞ΅ = Ο - Ξ΅, + halfΟ = Ο / 2, + d3_radians = Ο / 180, + d3_degrees = 180 / Ο; + +export { d3_radians }; + +export function test() { + console.assert(Ξ΅ === 1e-6); + return testDone(import.meta.url); +} diff --git a/test/snippets/utf8-package-json.json b/test/snippets/utf8-package-json.json new file mode 100644 index 000000000..aae7ce7b2 --- /dev/null +++ b/test/snippets/utf8-package-json.json @@ -0,0 +1,3 @@ +{ + "author": "Arnuad BarrΓ© (https://github.com/ArnaudBarre)" +} diff --git a/test/snippets/void-shouldnt-delete-call-expressions.js b/test/snippets/void-shouldnt-delete-call-expressions.js new file mode 100644 index 000000000..380fb591b --- /dev/null +++ b/test/snippets/void-shouldnt-delete-call-expressions.js @@ -0,0 +1,14 @@ +var was_called = false; +function thisShouldBeCalled() { + was_called = true; +} + +void thisShouldBeCalled(); + +export function test() { + if (!was_called) { + throw new Error("Expected thisShouldBeCalled to be called"); + } + + return testDone(import.meta.url); +} diff --git a/test/snippets/zero.js b/test/snippets/zero.js new file mode 100644 index 000000000..38f521ff1 --- /dev/null +++ b/test/snippets/zero.js @@ -0,0 +1 @@ +export const zero = "\0"; |