blob: 872a5de44eeadff170d247db48f296eeb023e4d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
import { TestBed } from '@angular/core/testing';
import { LogService } from './log.service';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { HttpClient } from '@angular/common/http';
import { environment } from 'src/environments/environment';
describe('LogService', () => {
let service: LogService
beforeEach(() =>
{
TestBed.configureTestingModule({
imports: [HttpClientTestingModule],
providers: [LogService, HttpClient, HttpClientTestingModule]
})
service = TestBed.get(LogService);
});
it('should be created', () => {
const service: LogService = TestBed.get(LogService);
expect(service).toBeTruthy();
});
it('should getLogData', () => {
service.getLogData("test").subscribe((res) => {
expect(res).toBe(environment.baseUrl);
});
});
});
|