|
|
@ -1,16 +1,24 @@ |
|
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; |
|
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; |
|
|
|
|
|
import { MyProjectNameComponent } from './components/my-project-name.component'; |
|
|
import { MyProjectNameComponent } from './my-project-name.component'; |
|
|
import { MyProjectNameService } from '@my-company-name/my-project-name'; |
|
|
|
|
|
import { of } from 'rxjs'; |
|
|
|
|
|
|
|
|
describe('MyProjectNameComponent', () => { |
|
|
describe('MyProjectNameComponent', () => { |
|
|
let component: MyProjectNameComponent; |
|
|
let component: MyProjectNameComponent; |
|
|
let fixture: ComponentFixture<MyProjectNameComponent>; |
|
|
let fixture: ComponentFixture<MyProjectNameComponent>; |
|
|
|
|
|
const mockMyProjectNameService = jasmine.createSpyObj('MyProjectNameService', { |
|
|
|
|
|
sample: of([]), |
|
|
|
|
|
}); |
|
|
beforeEach(waitForAsync(() => { |
|
|
beforeEach(waitForAsync(() => { |
|
|
TestBed.configureTestingModule({ |
|
|
TestBed.configureTestingModule({ |
|
|
declarations: [ MyProjectNameComponent ] |
|
|
declarations: [MyProjectNameComponent], |
|
|
}) |
|
|
providers: [ |
|
|
.compileComponents(); |
|
|
{ |
|
|
|
|
|
provide: MyProjectNameService, |
|
|
|
|
|
useValue: mockMyProjectNameService, |
|
|
|
|
|
}, |
|
|
|
|
|
], |
|
|
|
|
|
}).compileComponents(); |
|
|
})); |
|
|
})); |
|
|
|
|
|
|
|
|
beforeEach(() => { |
|
|
beforeEach(() => { |
|
|
|