moar unit test !
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 6m41s
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 6m41s
This commit is contained in:
@@ -40,13 +40,15 @@ vi.mock('node:fs/promises', () => ({
|
||||
vi.mock('../services/backgroundJobService');
|
||||
vi.mock('../services/geocodingService.server');
|
||||
vi.mock('../services/queueService.server');
|
||||
vi.mock('@bull-board/api');
|
||||
vi.mock('@bull-board/api/bullMQAdapter');
|
||||
vi.mock('@bull-board/api'); // Keep this mock for the API part
|
||||
vi.mock('@bull-board/api/bullMQAdapter'); // Keep this mock for the adapter
|
||||
|
||||
// Fix: Mock ExpressAdapter as a class to allow `new ExpressAdapter()` to work.
|
||||
vi.mock('@bull-board/express', () => ({
|
||||
ExpressAdapter: vi.fn().mockImplementation(() => ({
|
||||
setBasePath: vi.fn(),
|
||||
getRouter: () => (req: Request, res: Response, next: NextFunction) => next(),
|
||||
})),
|
||||
ExpressAdapter: class {
|
||||
setBasePath = vi.fn();
|
||||
getRouter = vi.fn().mockReturnValue((req: Request, res: Response, next: NextFunction) => next());
|
||||
},
|
||||
}));
|
||||
|
||||
// Import the mocked modules to control them
|
||||
|
||||
Reference in New Issue
Block a user