UNPKG

bot-guardian-js

Version:

A powerful bot detection and prevention library for Node.js applications

25 lines (24 loc) 597 B
"use strict"; // Mock fetch globally global.fetch = jest.fn(() => Promise.resolve({ ok: true, json: () => Promise.resolve({}), text: () => Promise.resolve('') })); // Mock console methods global.console = Object.assign(Object.assign({}, console), { error: jest.fn(), warn: jest.fn(), log: jest.fn() }); // Use fake timers jest.useFakeTimers(); // Cleanup afterEach(() => { jest.clearAllMocks(); jest.clearAllTimers(); }); afterAll(() => { jest.useRealTimers(); }); describe('Setup', () => { test('placeholder test', () => { expect(true).toBe(true); }); });