Skip to content

Commit bacfea6

Browse files
author
Salma Alam-Naylor
committed
Fixed tests for new components
1 parent 73d02e0 commit bacfea6

File tree

4 files changed

+445
-400
lines changed

4 files changed

+445
-400
lines changed

apps/fretonator-web/src/app/common/fretonator/chord-map/chord-map.component.spec.ts

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,33 @@
11
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
22

33
import { ChordMapComponent } from './chord-map.component';
4+
import { Component } from '@angular/core';
5+
import { ChordMapModule } from './chord-map.module';
46

57
describe('ChordMapComponent', () => {
6-
let component: ChordMapComponent;
7-
let fixture: ComponentFixture<ChordMapComponent>;
8+
9+
@Component({
10+
selector: 'app-chord-map-spec',
11+
template: `
12+
<app-chord-map></app-chord-map>
13+
`,
14+
})
15+
class ChordMapComponentSpec {
16+
}
17+
18+
let component: ChordMapComponentSpec;
19+
let fixture: ComponentFixture<ChordMapComponentSpec>;
820

921
beforeEach(async(() => {
1022
TestBed.configureTestingModule({
11-
declarations: [ ChordMapComponent ]
23+
declarations: [ ChordMapComponentSpec ],
24+
imports: [ ChordMapModule ]
1225
})
1326
.compileComponents();
1427
}));
1528

1629
beforeEach(() => {
17-
fixture = TestBed.createComponent(ChordMapComponent);
30+
fixture = TestBed.createComponent(ChordMapComponentSpec);
1831
component = fixture.componentInstance;
1932
fixture.detectChanges();
2033
});

apps/fretonator-web/src/app/common/fretonator/interval-map/interval-map.component.spec.ts

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,33 @@
11
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
22

33
import { IntervalMapComponent } from './interval-map.component';
4+
import { Component } from '@angular/core';
5+
import { IntervalMapModule } from './interval-map.module';
46

57
describe('IntervalMapComponent', () => {
6-
let component: IntervalMapComponent;
7-
let fixture: ComponentFixture<IntervalMapComponent>;
8+
9+
@Component({
10+
selector: 'app-interval-map-spec',
11+
template: `
12+
<app-interval-map></app-interval-map>
13+
`,
14+
})
15+
class IntervalMapComponentSpec {
16+
}
17+
18+
let component: IntervalMapComponentSpec;
19+
let fixture: ComponentFixture<IntervalMapComponentSpec>;
820

921
beforeEach(async(() => {
1022
TestBed.configureTestingModule({
11-
declarations: [ IntervalMapComponent ]
23+
declarations: [ IntervalMapComponentSpec ],
24+
imports: [ IntervalMapModule ]
1225
})
1326
.compileComponents();
1427
}));
1528

1629
beforeEach(() => {
17-
fixture = TestBed.createComponent(IntervalMapComponent);
30+
fixture = TestBed.createComponent(IntervalMapComponentSpec);
1831
component = fixture.componentInstance;
1932
fixture.detectChanges();
2033
});

apps/fretonator-web/src/app/common/fretonator/scale-map/scale-map.component.spec.ts

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,33 @@
11
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
22

33
import { ScaleMapComponent } from './scale-map.component';
4+
import { Component } from '@angular/core';
5+
import { ScaleMapModule } from './scale-map.module';
46

57
describe('ScaleMapComponent', () => {
6-
let component: ScaleMapComponent;
7-
let fixture: ComponentFixture<ScaleMapComponent>;
8+
9+
@Component({
10+
selector: 'app-scale-map-spec',
11+
template: `
12+
<app-scale-map></app-scale-map>
13+
`,
14+
})
15+
class ScaleMapComponentSpec {
16+
}
17+
18+
let component: ScaleMapComponentSpec;
19+
let fixture: ComponentFixture<ScaleMapComponentSpec>;
820

921
beforeEach(async(() => {
1022
TestBed.configureTestingModule({
11-
declarations: [ ScaleMapComponent ]
23+
declarations: [ ScaleMapComponentSpec ],
24+
imports: [ ScaleMapModule ]
1225
})
1326
.compileComponents();
1427
}));
1528

1629
beforeEach(() => {
17-
fixture = TestBed.createComponent(ScaleMapComponent);
30+
fixture = TestBed.createComponent(ScaleMapComponentSpec);
1831
component = fixture.componentInstance;
1932
fixture.detectChanges();
2033
});

0 commit comments

Comments
 (0)