nested-forms/libs/contact/src/lib/contact.service.spec.ts

23 lines
514 B
TypeScript

import { Contact } from './contact-model';
import { TestBed, async } from '@angular/core/testing';
import { ContactService } from './contact.service';
describe('ContactService', () => {
let service: ContactService;
beforeEach(() => {
service = new ContactService();
});
it('should be created', () => {
expect(service).toBeTruthy();
});
it('should return a contact', async(() => {
service.loadContact().subscribe((data: Contact) => {
expect(data).toBeTruthy();
});
}));
});