Skip to content

Commit

Permalink
fix(menu): test
Browse files Browse the repository at this point in the history
  • Loading branch information
vogloblinsky committed Oct 15, 2018
1 parent dcd8cea commit c1b940b
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions test/src/cli/cli-duplicates.spec.ts
Expand Up @@ -98,27 +98,15 @@ describe('CLI duplicates support', () => {
it('should support component inside module', () => {
let file = read(distFolder + '/js/menu-wc.js');
file = file.replace(/components-links-module-ValidationDemoModule-([a-zA-Z0-9-])+/g, 'components-links-module-ValidationDemoModule');
if (file.indexOf('\r') !== -1) {
// tslint:disable-next-line:max-line-length
expect(file).to.contain(`id="xs-components-links-module-ValidationDemoModule"') + '>\\r\\n \\r\\n <li class="link">\\r\\n <a href="components/ValidationDemo.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules">ValidationDemo</a>`);
} else {
// tslint:disable-next-line:max-line-length
expect(file).to.contain(`id="xs-components-links-module-ValidationDemoModule"') + '>\\n \\n <li class="link">\\n <a href="components/ValidationDemo.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules">ValidationDemo</a>`);
}
expect(file).to.contain(`id="xs-components-links-module-ValidationDemoModule"\') + \'>\\n \\n <li class="link">\\n <a href="components/ValidationDemo.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules">ValidationDemo</a>`);
});

it('should support component inside module with duplicate', () => {
let file = read(distFolder + '/js/menu-wc.js');
file = file.replace(/components-links-module-FooterModule-([a-zA-Z0-9-])+/g, 'components-links-module-FooterModule');
if (file.indexOf('\r') !== -1) {
// tslint:disable-next-line:max-line-length
expect(file).to.contain(`id="xs-components-links-module-FooterModule"') + '>\\r\\n \\r\\n <li class="link">\\r\\n <a href="components/FooterComponent-1.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules">FooterComponent</a>`);
expect(file).to.contain(`<li class="link">\\r\\n <a href="components/FooterComponent.html" data-type="entity-link">FooterComponent</a>`);
} else {
// tslint:disable-next-line:max-line-length
expect(file).to.contain(`id="xs-components-links-module-FooterModule"') + '>\\n \\n <li class="link">\\n <a href="components/FooterComponent-1.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules">FooterComponent</a>`);
expect(file).to.contain(`<li class="link">\\n <a href="components/FooterComponent.html" data-type="entity-link">FooterComponent</a>`);
}
// tslint:disable-next-line:max-line-length
expect(file).to.contain(`id="xs-components-links-module-FooterModule"\') + \'>\\n \\n <li class="link">\\n <a href="components/FooterComponent-1.html" data-type="entity-link" data-context="sub-entity" data-context-id="modules">FooterComponent</a>`);
expect(file).to.contain(`<li class="link">\\n <a href="components/FooterComponent.html" data-type="entity-link">FooterComponent</a>`);
});

it('Injectable with multiple decorators should not appear twice', () => {
Expand Down

0 comments on commit c1b940b

Please sign in to comment.