PRIMEIRO ENVIO
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
// Jest setup for crawler service
|
||||
|
||||
// Global test timeout
|
||||
jest.setTimeout(60000);
|
||||
|
||||
// Mock Puppeteer for tests
|
||||
jest.mock('puppeteer', () => ({
|
||||
launch: jest.fn().mockResolvedValue({
|
||||
newPage: jest.fn().mockResolvedValue({
|
||||
setViewport: jest.fn(),
|
||||
setUserAgent: jest.fn(),
|
||||
goto: jest.fn().mockResolvedValue({
|
||||
ok: () => true,
|
||||
status: () => 200
|
||||
}),
|
||||
content: jest.fn().mockResolvedValue('<html><head><title>Test</title></head><body>Test content</body></html>'),
|
||||
waitForSelector: jest.fn(),
|
||||
waitForTimeout: jest.fn(),
|
||||
close: jest.fn()
|
||||
}),
|
||||
close: jest.fn()
|
||||
})
|
||||
}));
|
||||
Reference in New Issue
Block a user