Tests und Mock
This commit is contained in:
13
test/setup.js
Normal file
13
test/setup.js
Normal file
@@ -0,0 +1,13 @@
|
||||
// Jest Setup für alle Tests
|
||||
const originalConsoleLog = console.log;
|
||||
|
||||
// Mock console.log um Warnings nach Tests zu vermeiden
|
||||
beforeAll(() => {
|
||||
console.log = jest.fn();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
console.log = originalConsoleLog;
|
||||
// Warten bis alle async Operationen fertig sind
|
||||
await new Promise(resolve => setTimeout(resolve, 200));
|
||||
});
|
||||
Reference in New Issue
Block a user