Build: transform String.raw (#18134)

This commit is contained in:
fisker Cheung authored and GitHub committed 2025-10-27 23:24:02 +08:00
1 parent eca8348812
commit b99012b48c
10 files changed
+147 -45

No files matched your search

+9
View File
@@ -109,3 +109,12 @@ test("Array#toReversed", () => {
`"foo.toReversed(extraArgument)"`,
);
});
test("String.raw", () => {
expect(transform("String.raw`\\\\\\uINVALID`")).toMatchInlineSnapshot(
String.raw`""\\\\\\uINVALID""`,
);
expect(transform("String.raw`\\uINVALID${'world'}`")).toMatchInlineSnapshot(
`" \`\\\\uINVALID\${'world'}\`"`,
);
});