diff --git a/src/parse-result.test.ts b/src/parse-result.test.ts index 688bca81..f6731aba 100644 --- a/src/parse-result.test.ts +++ b/src/parse-result.test.ts @@ -1738,6 +1738,19 @@ describe('ember-template-recast', function () { expect(print(ast)).toEqual('Bar'); }); + test('updating also adjust loc', function () { + let template = `short`; + + let ast = parse(template) as any; + + const body = ast.body[0]; + body.chars = 'much longer'; + + expect(body.loc.end.column).toEqual(11); + + expect(print(ast)).toEqual('much longer'); + }); + test('can be updated as value of AttrNode', function () { let template = `
`;