diff options
Diffstat (limited to '')
-rw-r--r-- | test/bundler/bundler_string.test.ts | 8 | ||||
-rw-r--r-- | test/transpiler/transpiler.test.js | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/test/bundler/bundler_string.test.ts b/test/bundler/bundler_string.test.ts index 3c2d7802c..45faaee3e 100644 --- a/test/bundler/bundler_string.test.ts +++ b/test/bundler/bundler_string.test.ts @@ -14,8 +14,8 @@ const templateStringTests: Record<string, TemplateStringTest> = { // note for writing tests: .print is .trim()'ed due to how run.stdout works Empty: { expr: '""', captureRaw: '""' }, NullByte: { expr: '"hello\0"', captureRaw: '"hello\0"' }, - EmptyTemplate: { expr: "``", captureRaw: "``" }, - ConstantTemplate: { expr: "`asdf`", captureRaw: "`asdf`" }, + EmptyTemplate: { expr: "``", captureRaw: '""' }, + ConstantTemplate: { expr: "`asdf`", captureRaw: '"asdf"' }, AddConstant: { expr: "`${7 + 6}`", capture: true }, AddConstant2: { expr: "`${7 + 6 + 96}`", capture: true }, AddConstant3: { expr: "`${0.1 + 0.2}`", print: true }, @@ -80,8 +80,8 @@ const templateStringTests: Record<string, TemplateStringTest> = { FoldNested4: { expr: "`a${`b`}c${`${`${`${'d'}`}`}`}e`", capture: true }, FoldNested5: { expr: "`\\$${`d`}`", print: true }, // could be captured FoldNested6: { expr: "`a\0${5}c\\${{$${`d`}e`", print: true }, - EscapedDollar: { expr: "`\\${'a'}`", captureRaw: "`\\${'a'}`" }, - EscapedDollar2: { expr: "`\\${'a'}\\${'b'}`", captureRaw: "`\\${'a'}\\${'b'}`" }, + EscapedDollar: { expr: "`\\${'a'}`", captureRaw: "\"${'a'}\"" }, + EscapedDollar2: { expr: "`\\${'a'}\\${'b'}`", captureRaw: "\"${'a'}${'b'}\"" }, }; describe("bundler", () => { diff --git a/test/transpiler/transpiler.test.js b/test/transpiler/transpiler.test.js index f83c00296..8c77dffe6 100644 --- a/test/transpiler/transpiler.test.js +++ b/test/transpiler/transpiler.test.js @@ -2809,7 +2809,7 @@ console.log(foo, array); expectPrinted("'string' + `template`", `"stringtemplate"`); - expectPrinted("`template` + 'string'", "`templatestring`"); + expectPrinted("`template` + 'string'", '"templatestring"'); // TODO: string template simplification // expectPrinted("'string' + `a${foo}b`", "`stringa${foo}b`"); @@ -3088,7 +3088,7 @@ console.log(foo, array); expectPrinted_('const x = `str` + "``";', "const x = `str\\`\\``"); expectPrinted_('const x = `` + "`";', "const x = `\\``"); expectPrinted_('const x = `` + "``";', "const x = `\\`\\``"); - expectPrinted_('const x = "``" + ``;', 'const x = "``"'); + expectPrinted_('const x = "``" + ``;', "const x = `\\`\\``"); }); }); |