UNPKG

odesli.js

Version:

Node.js Client to query odesli.co (song.link/album.link) API

23 lines (18 loc) 413 B
// Jest setup file // This file runs before each test // Mock fetch globally global.fetch = jest.fn(); // Reset all mocks before each test beforeEach(() => { jest.clearAllMocks(); }); // Mock console methods to reduce noise in tests global.console = { ...console, log: jest.fn(), debug: jest.fn(), info: jest.fn(), warn: jest.fn(), error: jest.fn(), }; require('jest-fetch-mock').enableMocks();