(template: string, start: number, end: number)
| 440 | |
| 441 | it('should not throw off span of value in bound attribute when leading spaces are present', () => { |
| 442 | const assertValueSpan = (template: string, start: number, end: number) => { |
| 443 | const result = parse(template); |
| 444 | const boundAttribute = (result.nodes[0] as t.Element).inputs[0]; |
| 445 | const span = (boundAttribute.value as ASTWithSource).ast.sourceSpan; |
| 446 | |
| 447 | expect(span.start).toBe(start); |
| 448 | expect(span.end).toBe(end); |
| 449 | }; |
| 450 | |
| 451 | assertValueSpan('<a [b]="helloWorld"></a>', 8, 18); |
| 452 | assertValueSpan('<a [b]=" helloWorld"></a>', 9, 19); |
no test coverage detected