Skip to content

Commit 3ed5c79

Browse files
committed
chore: add comments to biffurcate test cases
1 parent b36a7a9 commit 3ed5c79

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

test/prefer-string-raw.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,22 @@ test.snapshot({
4545

4646
test.snapshot({
4747
valid: [
48+
// No backslash
4849
'a = `a`',
4950
'a = `${foo}`',
5051
'a = `a${100}b`',
51-
'a = `a\\t${foo.bar}b\\\\c`',
52-
'a = `${foo}\\\\a${bar}\\``',
53-
'a = `a\\${`',
54-
'a = `${a}\\\'${b}\\\\`',
55-
'a = `\\"a\\\\b`',
52+
53+
// Escaped characters other than backslash
54+
'a = `a\\t${foo.bar}b\\\\c`', // \t
55+
'a = `${foo}\\\\a${bar}\\``', // \`
56+
'a = `a\\${`', // \$
57+
'a = `${a}\\\'${b}\\\\`', // \'
58+
'a = `\\"a\\\\b`', // \"
59+
60+
// Ending with backslash
5661
'a = `\\\\a${foo}b\\\\${foo}`',
62+
63+
// Multiline
5764
outdent`
5865
a = \`\\\\a \\
5966
b\`

0 commit comments

Comments
 (0)