24
tests/setup.js
Archivo normal
24
tests/setup.js
Archivo normal
@@ -0,0 +1,24 @@
|
||||
// Test setup file
|
||||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
const os = require('os');
|
||||
|
||||
// Create temporary directory for tests
|
||||
global.TEST_DIR = path.join(os.tmpdir(), 'alepm-tests');
|
||||
|
||||
beforeEach(async () => {
|
||||
await fs.ensureDir(global.TEST_DIR);
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await fs.remove(global.TEST_DIR);
|
||||
});
|
||||
|
||||
// Mock console methods to avoid noise in tests
|
||||
global.console = {
|
||||
...console,
|
||||
log: jest.fn(),
|
||||
info: jest.fn(),
|
||||
warn: jest.fn(),
|
||||
error: jest.fn()
|
||||
};
|
||||
Referencia en una nueva incidencia
Block a user