Listory/src/sources/spotify/spotify-api/spotify-api.service.spec.ts

26 lines
736 B
TypeScript
Raw Normal View History

2021-08-12 14:02:36 +00:00
import { HttpService } from "@nestjs/axios";
2020-05-02 17:17:20 +02:00
import { Test, TestingModule } from "@nestjs/testing";
import { SpotifyApiService } from "./spotify-api.service";
2020-02-02 19:21:58 +01:00
2020-05-02 17:17:20 +02:00
describe("SpotifyApiService", () => {
2020-02-02 19:21:58 +01:00
let service: SpotifyApiService;
2021-06-20 00:49:17 +02:00
let httpService: HttpService;
2020-02-02 19:21:58 +01:00
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
2021-06-20 00:49:17 +02:00
providers: [
SpotifyApiService,
{ provide: HttpService, useFactory: () => ({}) },
],
2020-02-02 19:21:58 +01:00
}).compile();
service = module.get<SpotifyApiService>(SpotifyApiService);
2021-06-20 00:49:17 +02:00
httpService = module.get<HttpService>(HttpService);
2020-02-02 19:21:58 +01:00
});
2020-05-02 17:17:20 +02:00
it("should be defined", () => {
2020-02-02 19:21:58 +01:00
expect(service).toBeDefined();
2021-06-20 00:49:17 +02:00
expect(httpService).toBeDefined();
2020-02-02 19:21:58 +01:00
});
});