(template: string, start: number, end: number)
| 425 | |
| 426 | it('should not throw off span of value in bound attribute when leading spaces are present', () => { |
| 427 | const assertValueSpan = (template: string, start: number, end: number) => { |
| 428 | const result = parse(template); |
| 429 | const boundAttribute = (result.nodes[0] as t.Element).inputs[0]; |
| 430 | const span = (boundAttribute.value as ASTWithSource).ast.sourceSpan; |
| 431 | |
| 432 | expect(span.start).toBe(start); |
| 433 | expect(span.end).toBe(end); |
| 434 | }; |
| 435 | |
| 436 | assertValueSpan('<a [b]="helloWorld"></a>', 8, 18); |
| 437 | assertValueSpan('<a [b]=" helloWorld"></a>', 9, 19); |
no test coverage detected