Skip to content
This repository was archived by the owner on Oct 1, 2018. It is now read-only.

Commit a6affdc

Browse files
authored
Merge pull request #223 from ashwin-sureshkumar/team-tests-fix
fix(teams): Fix broken test imports and tests validation
2 parents be78296 + 6a4cd39 commit a6affdc

File tree

3 files changed

+28
-11
lines changed

3 files changed

+28
-11
lines changed

src/app/team/member.component.spec.ts

+19-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,35 @@
1+
import { SocialSharingComponent } from './social-sharing/social-sharing.component';
12
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
23

34
import { MemberComponent } from './member.component';
5+
import { MaterialModule } from '../material/material.module';
6+
import { NO_ERRORS_SCHEMA } from '@angular/core';
47

58
describe('MemberComponent', () => {
69
let component: MemberComponent;
710
let fixture: ComponentFixture<MemberComponent>;
811

9-
beforeEach(async(() => {
10-
TestBed.configureTestingModule({
11-
declarations: [ MemberComponent ]
12+
beforeEach(
13+
async(() => {
14+
TestBed.configureTestingModule({
15+
declarations: [MemberComponent],
16+
schemas: [NO_ERRORS_SCHEMA]
17+
}).compileComponents();
1218
})
13-
.compileComponents();
14-
}));
19+
);
1520

1621
beforeEach(() => {
1722
fixture = TestBed.createComponent(MemberComponent);
1823
component = fixture.componentInstance;
24+
component.member = {
25+
name: 'ben lesh',
26+
role: 'lead',
27+
githubUrl: '',
28+
avatar: '',
29+
twitterUrl: '',
30+
linkedinUrl: '',
31+
bio: ''
32+
};
1933
fixture.detectChanges();
2034
});
2135

src/app/team/member.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ import { IMember } from './team.models';
77
templateUrl: './member.component.html',
88
styleUrls: ['./member.component.scss']
99
})
10-
export class MemberComponent{
10+
export class MemberComponent {
1111
@Input() member: IMember;
1212
}

src/app/team/social-sharing/social-sharing.component.spec.ts

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
22

33
import { SocialSharingComponent } from './social-sharing.component';
4+
import { MaterialModule } from '../../material/material.module';
45

56
describe('SocialSharingComponent', () => {
67
let component: SocialSharingComponent;
78
let fixture: ComponentFixture<SocialSharingComponent>;
89

9-
beforeEach(async(() => {
10-
TestBed.configureTestingModule({
11-
declarations: [ SocialSharingComponent ]
10+
beforeEach(
11+
async(() => {
12+
TestBed.configureTestingModule({
13+
imports: [MaterialModule],
14+
declarations: [SocialSharingComponent]
15+
}).compileComponents();
1216
})
13-
.compileComponents();
14-
}));
17+
);
1518

1619
beforeEach(() => {
1720
fixture = TestBed.createComponent(SocialSharingComponent);

0 commit comments

Comments
 (0)