// Get reference to the mocked couchdbService for test usage const couchdbService = require('../services/couchdbService'); // Make mock available for tests to reference global.mockCouchdbService = couchdbService; // Set test environment variables process.env.JWT_SECRET = 'test-jwt-secret'; process.env.NODE_ENV = 'test'; process.env.COUCHDB_URL = 'http://localhost:5984'; process.env.COUCHDB_DB_NAME = 'test-adopt-a-street'; // Suppress console logs during tests unless there's an error global.console = { ...console, log: jest.fn(), debug: jest.fn(), info: jest.fn(), warn: jest.fn(), error: console.error, // Keep error logging };