// In your test
import {mockService} from '@orion-js/services'
import {UserService} from './UserService'
import {AuthService} from './AuthService'
describe('AuthService', () => {
it('should authenticate valid users', async () => {
// Mock the dependency
mockService(UserService, {
findByEmail: async () => ({
id: '123',
email: 'test@example.com',
password: 'hashed_password'
})
})
const authService = new AuthService()
const result = await authService.login('test@example.com', 'password')
expect(result).toBeDefined()
})
})