Skip to content
Snippets Groups Projects
Select Git revision
  • 7f751009d515de01d402637c1ee390b1d409823b
  • master default protected
  • develop
  • bugfix/missing-newline-parse-error
  • jastadd-fix-inc-param-debug
  • jastadd-2.3.5
  • 1.0.0-pre-release.alpha
7 results

using.md

Blame
  • api.service.spec.ts 602 B
    import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
    import {TestBed} from '@angular/core/testing';
    
    import {ApiService} from './api.service';
    
    describe('ApiService', () => {
      beforeEach(() => {
        TestBed.configureTestingModule({
          imports: [HttpClientTestingModule],
          providers: [ApiService]
        });
      });
    
      afterEach(() => {
        const httpMock = TestBed.get(HttpTestingController);
        httpMock.verify();
      });
    
      it('should be created', () => {
        const service: ApiService = TestBed.get(ApiService);
        expect(service).toBeTruthy();
      });
    });