Created
April 11, 2020 03:51
-
-
Save ManuelDeLeon/052eaedc5530cf9f9b3332fd0974be28 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ComponentFixture, TestBed } from '@angular/core/testing'; | |
import { NO_ERRORS_SCHEMA } from '@angular/core'; | |
import { MessageService } from '../message.service'; | |
import { MessagesComponent } from './messages.component'; | |
describe('MessagesComponent', () => { | |
let component: MessagesComponent; | |
let fixture: ComponentFixture<MessagesComponent>; | |
beforeEach(() => { | |
const messageServiceStub = () => ({}); | |
TestBed.configureTestingModule({ | |
schemas: [NO_ERRORS_SCHEMA], | |
declarations: [MessagesComponent], | |
providers: [{ provide: MessageService, useFactory: messageServiceStub }] | |
}); | |
fixture = TestBed.createComponent(MessagesComponent); | |
component = fixture.componentInstance; | |
}); | |
it('can load instance', () => { | |
expect(component).toBeTruthy(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment