ci: Mock getAppConfig in various tests to provide default configurations

This commit is contained in:
Danny Avila 2025-08-17 19:39:22 -04:00
parent 2501d11fa0
commit b2b2aee945
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
7 changed files with 150 additions and 23 deletions

View file

@ -8,6 +8,14 @@ jest.mock('~/server/services/UserService', () => ({
getUserKey: jest.fn().mockImplementation(() => ({})),
}));
jest.mock('~/server/services/Config', () => ({
getAppConfig: jest.fn().mockResolvedValue({
google: {
apiKey: 'test-key',
},
}),
}));
const app = { locals: {} };
describe('google/initializeClient', () => {