|
| 1 | +# Snapshot report for `test/consistent-template-literal-escape.js` |
| 2 | + |
| 3 | +The actual snapshot is saved in `consistent-template-literal-escape.js.snap`. |
| 4 | + |
| 5 | +Generated by [AVA](https://avajs.dev). |
| 6 | + |
| 7 | +## invalid(1): const foo = `$\{a}` |
| 8 | + |
| 9 | +> Input |
| 10 | +
|
| 11 | + `␊ |
| 12 | + 1 | const foo = \`$\\{a}\`␊ |
| 13 | + ` |
| 14 | + |
| 15 | +> Error 1/1 |
| 16 | +
|
| 17 | + `␊ |
| 18 | + Message:␊ |
| 19 | + > 1 | const foo = \`$\\{a}\`␊ |
| 20 | + | ^^^^^^^ Use \`\\${\` instead of \`$\\{\` to escape in template literals.␊ |
| 21 | + ␊ |
| 22 | + Output:␊ |
| 23 | + 1 | const foo = \`\\${a}\`␊ |
| 24 | + ` |
| 25 | + |
| 26 | +## invalid(2): const foo = `\$\{a}` |
| 27 | + |
| 28 | +> Input |
| 29 | +
|
| 30 | + `␊ |
| 31 | + 1 | const foo = \`\\$\\{a}\`␊ |
| 32 | + ` |
| 33 | + |
| 34 | +> Error 1/1 |
| 35 | +
|
| 36 | + `␊ |
| 37 | + Message:␊ |
| 38 | + > 1 | const foo = \`\\$\\{a}\`␊ |
| 39 | + | ^^^^^^^^ Use \`\\${\` instead of \`$\\{\` to escape in template literals.␊ |
| 40 | + ␊ |
| 41 | + Output:␊ |
| 42 | + 1 | const foo = \`\\${a}\`␊ |
| 43 | + ` |
| 44 | + |
| 45 | +## invalid(3): const foo = `$\{a} and $\{b}` |
| 46 | + |
| 47 | +> Input |
| 48 | +
|
| 49 | + `␊ |
| 50 | + 1 | const foo = \`$\\{a} and $\\{b}\`␊ |
| 51 | + ` |
| 52 | + |
| 53 | +> Error 1/1 |
| 54 | +
|
| 55 | + `␊ |
| 56 | + Message:␊ |
| 57 | + > 1 | const foo = \`$\\{a} and $\\{b}\`␊ |
| 58 | + | ^^^^^^^^^^^^^^^^^ Use \`\\${\` instead of \`$\\{\` to escape in template literals.␊ |
| 59 | + ␊ |
| 60 | + Output:␊ |
| 61 | + 1 | const foo = \`\\${a} and \\${b}\`␊ |
| 62 | + ` |
| 63 | + |
| 64 | +## invalid(4): const foo = `\\$\{a}` |
| 65 | + |
| 66 | +> Input |
| 67 | +
|
| 68 | + `␊ |
| 69 | + 1 | const foo = \`\\\\$\\{a}\`␊ |
| 70 | + ` |
| 71 | + |
| 72 | +> Error 1/1 |
| 73 | +
|
| 74 | + `␊ |
| 75 | + Message:␊ |
| 76 | + > 1 | const foo = \`\\\\$\\{a}\`␊ |
| 77 | + | ^^^^^^^^^ Use \`\\${\` instead of \`$\\{\` to escape in template literals.␊ |
| 78 | + ␊ |
| 79 | + Output:␊ |
| 80 | + 1 | const foo = \`\\\\\\${a}\`␊ |
| 81 | + ` |
| 82 | + |
| 83 | +## invalid(5): const foo = `\\\$\{a}` |
| 84 | + |
| 85 | +> Input |
| 86 | +
|
| 87 | + `␊ |
| 88 | + 1 | const foo = \`\\\\\\$\\{a}\`␊ |
| 89 | + ` |
| 90 | + |
| 91 | +> Error 1/1 |
| 92 | +
|
| 93 | + `␊ |
| 94 | + Message:␊ |
| 95 | + > 1 | const foo = \`\\\\\\$\\{a}\`␊ |
| 96 | + | ^^^^^^^^^^ Use \`\\${\` instead of \`$\\{\` to escape in template literals.␊ |
| 97 | + ␊ |
| 98 | + Output:␊ |
| 99 | + 1 | const foo = \`\\\\\\${a}\`␊ |
| 100 | + ` |
| 101 | + |
| 102 | +## invalid(6): const foo = html`$\{a}` |
| 103 | + |
| 104 | +> Input |
| 105 | +
|
| 106 | + `␊ |
| 107 | + 1 | const foo = html\`$\\{a}\`␊ |
| 108 | + ` |
| 109 | + |
| 110 | +> Error 1/1 |
| 111 | +
|
| 112 | + `␊ |
| 113 | + Message:␊ |
| 114 | + > 1 | const foo = html\`$\\{a}\`␊ |
| 115 | + | ^^^^^^^ Use \`\\${\` instead of \`$\\{\` to escape in template literals.␊ |
| 116 | + ` |
| 117 | + |
| 118 | +## invalid(7): const foo = `$\{a}${expr}` |
| 119 | + |
| 120 | +> Input |
| 121 | +
|
| 122 | + `␊ |
| 123 | + 1 | const foo = \`$\\{a}${expr}\`␊ |
| 124 | + ` |
| 125 | + |
| 126 | +> Error 1/1 |
| 127 | +
|
| 128 | + `␊ |
| 129 | + Message:␊ |
| 130 | + > 1 | const foo = \`$\\{a}${expr}\`␊ |
| 131 | + | ^^^^^^^^ Use \`\\${\` instead of \`$\\{\` to escape in template literals.␊ |
| 132 | + ␊ |
| 133 | + Output:␊ |
| 134 | + 1 | const foo = \`\\${a}${expr}\`␊ |
| 135 | + ` |
| 136 | + |
| 137 | +## invalid(8): const foo = `${expr}$\{a}` |
| 138 | + |
| 139 | +> Input |
| 140 | +
|
| 141 | + `␊ |
| 142 | + 1 | const foo = \`${expr}$\\{a}\`␊ |
| 143 | + ` |
| 144 | + |
| 145 | +> Error 1/1 |
| 146 | +
|
| 147 | + `␊ |
| 148 | + Message:␊ |
| 149 | + > 1 | const foo = \`${expr}$\\{a}\`␊ |
| 150 | + | ^^^^^^^ Use \`\\${\` instead of \`$\\{\` to escape in template literals.␊ |
| 151 | + ␊ |
| 152 | + Output:␊ |
| 153 | + 1 | const foo = \`${expr}\\${a}\`␊ |
| 154 | + ` |
| 155 | + |
| 156 | +## invalid(9): const foo = `$\{a}${expr}$\{b}` |
| 157 | + |
| 158 | +> Input |
| 159 | +
|
| 160 | + `␊ |
| 161 | + 1 | const foo = \`$\\{a}${expr}$\\{b}\`␊ |
| 162 | + ` |
| 163 | + |
| 164 | +> Error 1/2 |
| 165 | +
|
| 166 | + `␊ |
| 167 | + Message:␊ |
| 168 | + > 1 | const foo = \`$\\{a}${expr}$\\{b}\`␊ |
| 169 | + | ^^^^^^^^ Use \`\\${\` instead of \`$\\{\` to escape in template literals.␊ |
| 170 | + ␊ |
| 171 | + Output:␊ |
| 172 | + 1 | const foo = \`\\${a}${expr}$\\{b}\`␊ |
| 173 | + ` |
| 174 | + |
| 175 | +> Error 2/2 |
| 176 | +
|
| 177 | + `␊ |
| 178 | + Message:␊ |
| 179 | + > 1 | const foo = \`$\\{a}${expr}$\\{b}\`␊ |
| 180 | + | ^^^^^^^ Use \`\\${\` instead of \`$\\{\` to escape in template literals.␊ |
| 181 | + ␊ |
| 182 | + Output:␊ |
| 183 | + 1 | const foo = \`$\\{a}${expr}\\${b}\`␊ |
| 184 | + ` |
0 commit comments