(test) add test

This commit is contained in:
Kim Biesbjerg
2019-06-13 11:59:36 +02:00
parent 36928e253d
commit deb38eb7c3
3 changed files with 15 additions and 3 deletions

View File

@@ -31,6 +31,18 @@ describe('Utils', () => {
expect(template).to.equal('<p translate>Hello World</p>');
});
it('should extract inline template without html', () => {
const contents = `
@Component({
selector: 'test',
template: 'Hello World'
})
export class TestComponent { }
`;
const template = extractComponentInlineTemplate(contents);
expect(template).to.equal('Hello World');
});
it('should extract inline template spanning multiple lines', () => {
const contents = `
@Component({