Created
January 7, 2021 15:07
-
-
Save nishabe/c4a1aeb33a42748a66cb9a4e6159d9f2 to your computer and use it in GitHub Desktop.
api.service.spec.ts
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 { Test, TestingModule } from '@nestjs/testing'; | |
import { ApiService } from './api.service'; | |
import { HttpModule } from '@nestjs/common'; | |
describe('ApiService', () => { | |
let service: ApiService; | |
beforeEach(async () => { | |
const module: TestingModule = await Test.createTestingModule({ | |
providers: [ApiService], | |
imports: [HttpModule], | |
}).compile(); | |
service = module.get<ApiService>(ApiService); | |
}); | |
it('ApiService - should be defined', () => { | |
expect(service).toBeDefined(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment