mirror of
https://github.com/Mueller-Patrick/Betterzon.git
synced 2026-04-29 00:30:11 +00:00
BETTERZON-83: FE unit testing (#35)
* BETTERZON-83: Making pre-generated unit tests work * BETTERZON-83: Writing unit tests for angular to improve code coverage
This commit is contained in:
@@ -1,16 +1,21 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import {TestBed} from '@angular/core/testing';
|
||||
|
||||
import { ApiService } from './api.service';
|
||||
import {ApiService} from './api.service';
|
||||
import {HttpClientModule} from "@angular/common/http";
|
||||
|
||||
describe('ApiService', () => {
|
||||
let service: ApiService;
|
||||
let service: ApiService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(ApiService);
|
||||
});
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
HttpClientModule
|
||||
]
|
||||
});
|
||||
service = TestBed.inject(ApiService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user