// 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 (must be at least 32 chars for validation) process.env.JWT_SECRET = 'test-jwt-secret-for-testing-purposes-that-is-long-enough'; process.env.NODE_ENV = 'test'; process.env.COUCHDB_URL = 'http://localhost:5984'; process.env.COUCHDB_DB_NAME = 'adopt-a-street-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 };