diff --git a/tests/parsers/abstract-template.parser.spec.ts b/tests/parsers/abstract-template.parser.spec.ts index 126f1ba..861d9f8 100644 --- a/tests/parsers/abstract-template.parser.spec.ts +++ b/tests/parsers/abstract-template.parser.spec.ts @@ -8,10 +8,6 @@ class TestTemplateParser extends AbstractTemplateParser { return this._isAngularComponent(filePath); } - public normalizeTemplateAttributes(template: string): string { - return this._normalizeTemplateAttributes(template); - } - public extractInlineTemplate(contents: string): string { return this._extractInlineTemplate(contents); } @@ -41,12 +37,6 @@ describe('AbstractTemplateParser', () => { expect(result).to.equal(false); }); - it('should normalize bound attributes', () => { - const contents = `
Hello World
`; - const template = parser.normalizeTemplateAttributes(contents); - expect(template).to.equal('Hello World
'); - }); - it('should extract inline template', () => { const contents = ` @Component({ diff --git a/tests/parsers/directive.parser.spec.ts b/tests/parsers/directive.parser.spec.ts index 499f608..3ce777a 100644 --- a/tests/parsers/directive.parser.spec.ts +++ b/tests/parsers/directive.parser.spec.ts @@ -2,15 +2,23 @@ import { expect } from 'chai'; import { DirectiveParser } from '../../src/parsers/directive.parser'; +class TestDirectiveParser extends DirectiveParser { + + public normalizeTemplateAttributes(template: string): string { + return this._normalizeTemplateAttributes(template); + } + +} + describe('DirectiveParser', () => { const templateFilename: string = 'test.template.html'; const componentFilename: string = 'test.component.ts'; - let parser: DirectiveParser; + let parser: TestDirectiveParser; beforeEach(() => { - parser = new DirectiveParser(); + parser = new TestDirectiveParser(); }); it('should extract contents when no translate attribute value is provided', () => { @@ -104,4 +112,10 @@ describe('DirectiveParser', () => { expect(collection.values).to.deep.equal({}); }); + it('should normalize bound attributes', () => { + const contents = `Hello World
`; + const template = parser.normalizeTemplateAttributes(contents); + expect(template).to.equal('Hello World
'); + }); + });