// Add Jest matchers for better assertions
expect.extend({
toBeFunction(received: unknown) {
const pass = typeof received === 'function';
return {
message: () =>
`expected ${received} to be a function`,
pass,
};
},
});
// Extend Jest types
declare global {
namespace jest {
interface Matchers<R> {
toBeFunction(): R;
}
}
}
// Mock console.error to keep test output clean
console.error = jest.fn();
// Clear mocks before each test
beforeEach(() => {
jest.clearAllMocks();
});
export {};