Listory/src/sources/spotify/spotify-api/spotify-api.service.spec.ts
2021-08-12 17:08:23 +02:00

25 lines
736 B
TypeScript

import { HttpService } from "@nestjs/axios";
import { Test, TestingModule } from "@nestjs/testing";
import { SpotifyApiService } from "./spotify-api.service";
describe("SpotifyApiService", () => {
let service: SpotifyApiService;
let httpService: HttpService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [
SpotifyApiService,
{ provide: HttpService, useFactory: () => ({}) },
],
}).compile();
service = module.get<SpotifyApiService>(SpotifyApiService);
httpService = module.get<HttpService>(HttpService);
});
it("should be defined", () => {
expect(service).toBeDefined();
expect(httpService).toBeDefined();
});
});