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