Skip to content

Commit 373d25b

Browse files
committed
add some tests
1 parent 663f8ea commit 373d25b

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

tests/specs/literals/StringLiteral/StringLiteral_All.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
const t = "\t" ;
33
const u = "";
44
const v = "1";
5+
const w = "\uD800";
56

67
[expect]
78
const t = "\t";
89
const u = "";
910
const v = "1";
11+
const w = "\uD800";
1012

1113
== should not replace actual character with escaped character ==
1214
const t = " ";

tests/specs/literals/StringLiteral/StringLiteral_QuoteProps_Consistent.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,3 +174,15 @@ const x = {
174174
}),
175175
"/src/shared/index.ts": `export const a: Unrestricted = 1;`,
176176
};
177+
178+
== should add quotes for this ==
179+
const objectLiteral = {
180+
"\uD800": true,
181+
test: 1,
182+
};
183+
184+
[expect]
185+
const objectLiteral = {
186+
"\uD800": true,
187+
"test": 1,
188+
};

0 commit comments

Comments
 (0)