Skip to content

Commit

Permalink
Added dummy tests for fa-layers-counter and fa-layers-text
Browse files Browse the repository at this point in the history
  • Loading branch information
devoto13 committed Aug 9, 2019
1 parent f38f7a6 commit 591f275
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/lib/layers/layers-counter.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Component } from '@angular/core';
import { initTest, queryByCss } from '../../testing/helpers';

describe('FaLayersCounterComponent', () => {
it('should render counter layer', () => {
@Component({
selector: 'fa-host',
template: `
<fa-layers>
<fa-layers-counter [content]="'Test'" [styles]="{ color: 'Tomato' }"></fa-layers-counter>
</fa-layers>`
})
class HostComponent {
}

const fixture = initTest(HostComponent);
fixture.detectChanges();
expect(queryByCss(fixture, 'fa-layers-counter > span')).toBeTruthy();
});
});
20 changes: 20 additions & 0 deletions src/lib/layers/layers-text.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Component } from '@angular/core';
import { initTest, queryByCss } from '../../testing/helpers';

describe('FaLayersTextComponent', () => {
it('should render text layer', () => {
@Component({
selector: 'fa-host',
template: `
<fa-layers>
<fa-layers-text [content]="'Test'" [styles]="{ color: 'Tomato' }"></fa-layers-text>
</fa-layers>`
})
class HostComponent {
}

const fixture = initTest(HostComponent);
fixture.detectChanges();
expect(queryByCss(fixture, 'fa-layers-text > span')).toBeTruthy();
});
});

0 comments on commit 591f275

Please sign in to comment.