@@ -120,125 +120,98 @@ test.describe("The html tag template helper", () => {
120120 const scenarios = [
121121 // string
122122 {
123- template : html `
124- ${ stringValue } end
125- ` ,
123+ // prettier-ignore
124+ template : html `${ stringValue } end` ,
126125 result : `${ FAKE . interpolation } end` ,
127126 } ,
128127 {
129- template : html `
130- beginning ${ stringValue } end
131- ` ,
128+ // prettier-ignore
129+ template : html `beginning ${ stringValue } end` ,
132130 result : `beginning ${ FAKE . interpolation } end` ,
133131 } ,
134132 {
135- template : html `
136- beginning ${ stringValue }
137- ` ,
133+ // prettier-ignore
134+ template : html `beginning ${ stringValue } ` ,
138135 result : `beginning ${ FAKE . interpolation } ` ,
139136 } ,
140137 // number
141138 {
142- template : html `
143- ${ numberValue } end
144- ` ,
139+ // prettier-ignore
140+ template : html `${ numberValue } end` ,
145141 result : `${ FAKE . interpolation } end` ,
146142 } ,
147143 {
148- template : html `
149- beginning ${ numberValue } end
150- ` ,
144+ // prettier-ignore
145+ template : html `beginning ${ numberValue } end` ,
151146 result : `beginning ${ FAKE . interpolation } end` ,
152147 } ,
153148 {
154- template : html `
155- beginning ${ numberValue }
156- ` ,
149+ // prettier-ignore
150+ template : html `beginning ${ numberValue } ` ,
157151 result : `beginning ${ FAKE . interpolation } ` ,
158152 } ,
159153 // expression
160154 {
161- template : html `
162- ${ x => x . value } end
163- ` ,
155+ // prettier-ignore
156+ template : html `${ x => x . value } end` ,
164157 result : `${ FAKE . interpolation } end` ,
165158 expectDirectives : [ HTMLBindingDirective ] ,
166159 } ,
167160 {
168- template : html `
169- beginning ${ x => x . value } end
170- ` ,
161+ // prettier-ignore
162+ template : html `beginning ${ x => x . value } end` ,
171163 result : `beginning ${ FAKE . interpolation } end` ,
172164 expectDirectives : [ HTMLBindingDirective ] ,
173165 } ,
174166 {
175- template : html `
176- beginning ${ x => x . value }
177- ` ,
167+ // prettier-ignore
168+ template : html `beginning ${ x => x . value } ` ,
178169 result : `beginning ${ FAKE . interpolation } ` ,
179170 expectDirectives : [ HTMLBindingDirective ] ,
180171 } ,
181172 // directive
182173 {
183- template : html `
184- ${ new TestDirective ( ) } end
185- ` ,
174+ // prettier-ignore
175+ template : html `${ new TestDirective ( ) } end` ,
186176 result : `${ FAKE . comment } end` ,
187177 expectDirectives : [ TestDirective ] ,
188178 } ,
189179 {
190- template : html `
191- beginning ${ new TestDirective ( ) } end
192- ` ,
180+ // prettier-ignore
181+ template : html `beginning ${ new TestDirective ( ) } end` ,
193182 result : `beginning ${ FAKE . comment } end` ,
194183 expectDirectives : [ TestDirective ] ,
195184 } ,
196185 {
197- template : html `
198- beginning ${ new TestDirective ( ) }
199- ` ,
186+ // prettier-ignore
187+ template : html `beginning ${ new TestDirective ( ) } ` ,
200188 result : `beginning ${ FAKE . comment } ` ,
201189 expectDirectives : [ TestDirective ] ,
202190 } ,
203191 // template
204192 {
205- template : html `
206- ${ html `
207- sub-template
208- ` }
209- end
210- ` ,
193+ // prettier-ignore
194+ template : html `${ html `sub-template` } end` ,
211195 result : `${ FAKE . interpolation } end` ,
212196 expectDirectives : [ HTMLBindingDirective ] ,
213197 } ,
214198 {
215- template : html `
216- beginning
217- ${ html `
218- sub-template
219- ` }
220- end
221- ` ,
199+ // prettier-ignore
200+ template : html `beginning ${ html `sub-template` } end` ,
222201 result : `beginning ${ FAKE . interpolation } end` ,
223202 expectDirectives : [ HTMLBindingDirective ] ,
224203 } ,
225204 {
226- template : html `
227- beginning
228- ${ html `
229- sub-template
230- ` }
231- ` ,
205+ // prettier-ignore
206+ template : html `beginning ${ html `sub-template` } ` ,
232207 result : `beginning ${ FAKE . interpolation } ` ,
233208 expectDirectives : [ HTMLBindingDirective ] ,
234209 } ,
235210 // mixed back-to-back
236211 {
237- template : html `
238- ${ stringValue } ${ numberValue } ${ x =>
239- x . value } ${ new TestDirective ( ) }
240- end
241- ` ,
212+ // prettier-ignore
213+ template : html `${ stringValue } ${ numberValue } ${
214+ x => x . value } ${ new TestDirective ( ) } end`,
242215 result : `${ FAKE . interpolation } ${ FAKE . interpolation } ${ FAKE . interpolation } ${ FAKE . comment } end` ,
243216 expectDirectives : [
244217 HTMLBindingDirective ,
@@ -247,12 +220,10 @@ test.describe("The html tag template helper", () => {
247220 ] ,
248221 } ,
249222 {
250- template : html `
251- beginning
252- ${ stringValue } ${ numberValue } ${ x =>
253- x . value } ${ new TestDirective ( ) }
254- end
255- ` ,
223+ // prettier-ignore
224+ template : html `beginning ${ stringValue } ${ numberValue } ${
225+ x => x . value
226+ } ${ new TestDirective ( ) } end`,
256227 result : `beginning ${ FAKE . interpolation } ${ FAKE . interpolation } ${ FAKE . interpolation } ${ FAKE . comment } end` ,
257228 expectDirectives : [
258229 HTMLBindingDirective ,
@@ -261,11 +232,10 @@ test.describe("The html tag template helper", () => {
261232 ] ,
262233 } ,
263234 {
264- template : html `
265- beginning
266- ${ stringValue } ${ numberValue } ${ x =>
267- x . value } ${ new TestDirective ( ) }
268- ` ,
235+ // prettier-ignore
236+ template : html `beginning ${ stringValue } ${ numberValue } ${
237+ x => x . value } ${ new TestDirective ( )
238+ } `,
269239 result : `beginning ${ FAKE . interpolation } ${ FAKE . interpolation } ${ FAKE . interpolation } ${ FAKE . comment } ` ,
270240 expectDirectives : [
271241 HTMLBindingDirective ,
@@ -275,11 +245,10 @@ test.describe("The html tag template helper", () => {
275245 } ,
276246 // mixed separated
277247 {
278- template : html `
279- ${ stringValue } separator${ numberValue } separator${ x =>
280- x . value } separator${ new TestDirective ( ) }
281- end
282- ` ,
248+ // prettier-ignore
249+ template : html `${ stringValue } separator${ numberValue } separator${
250+ x => x . value
251+ } separator${ new TestDirective ( ) } end`,
283252 // eslint-disable-next-line max-len
284253 result : `${ FAKE . interpolation } separator${ FAKE . interpolation } separator${ FAKE . interpolation } separator${ FAKE . comment } end` ,
285254 expectDirectives : [
@@ -289,12 +258,10 @@ test.describe("The html tag template helper", () => {
289258 ] ,
290259 } ,
291260 {
292- template : html `
293- beginning
294- ${ stringValue } separator${ numberValue } separator${ x =>
295- x . value } separator${ new TestDirective ( ) }
296- end
297- ` ,
261+ // prettier-ignore
262+ template : html `beginning ${ stringValue } separator${ numberValue } separator${
263+ x => x . value
264+ } separator${ new TestDirective ( ) } end`,
298265 // eslint-disable-next-line max-len
299266 result : `beginning ${ FAKE . interpolation } separator${ FAKE . interpolation } separator${ FAKE . interpolation } separator${ FAKE . comment } end` ,
300267 expectDirectives : [
@@ -304,11 +271,10 @@ test.describe("The html tag template helper", () => {
304271 ] ,
305272 } ,
306273 {
307- template : html `
308- beginning
309- ${ stringValue } separator${ numberValue } separator${ x =>
310- x . value } separator${ new TestDirective ( ) }
311- ` ,
274+ // prettier-ignore
275+ template : html `beginning ${ stringValue } separator${ numberValue } separator${
276+ x => x . value
277+ } separator${ new TestDirective ( ) } `,
312278 // eslint-disable-next-line max-len
313279 result : `beginning ${ FAKE . interpolation } separator${ FAKE . interpolation } separator${ FAKE . interpolation } separator${ FAKE . comment } ` ,
314280 expectDirectives : [
@@ -319,8 +285,6 @@ test.describe("The html tag template helper", () => {
319285 } ,
320286 ] ;
321287
322- const x = scenarios [ idx ] ;
323-
324288 // expectTemplateEquals
325289 function expectTemplateEquals ( template , expectedHTML ) {
326290 if ( ! ( template instanceof ViewTemplate ) ) return "not a ViewTemplate" ;
0 commit comments