fixed all tests

This commit is contained in:
Boki 2025-06-26 17:30:13 -04:00
parent 08f713d98b
commit bd26ecf3bc
11 changed files with 457 additions and 794 deletions

View file

@ -1,13 +1,11 @@
import { describe, expect, it } from 'bun:test';
import * as handlersExports from '../src';
import { BaseHandler, ScheduledHandler } from '../src';
import { BaseHandler } from '../src';
describe('Handlers Package Exports', () => {
it('should export base handler classes', () => {
expect(handlersExports.BaseHandler).toBeDefined();
expect(handlersExports.ScheduledHandler).toBeDefined();
expect(handlersExports.BaseHandler).toBe(BaseHandler);
expect(handlersExports.ScheduledHandler).toBe(ScheduledHandler);
});
it('should export utility functions', () => {
@ -83,21 +81,4 @@ describe('Handlers Package Exports', () => {
expect(operationMetadata).toBeDefined();
});
it('should have correct class inheritance', () => {
// ScheduledHandler should extend BaseHandler
const mockServices = {
cache: null,
globalCache: null,
queueManager: null,
proxy: null,
browser: null,
mongodb: null,
postgres: null,
questdb: null,
} as any;
const handler = new ScheduledHandler(mockServices);
expect(handler).toBeInstanceOf(BaseHandler);
expect(handler).toBeInstanceOf(ScheduledHandler);
});
});