style: apply prettier formatting to test files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -139,7 +139,10 @@ describe('AuthApplicationService', () => {
|
||||
const user = UserFactory.createUserDefault()
|
||||
let resolveLogin: (value: boolean) => void
|
||||
mockSessionManager.loginByComputerName.mockImplementation(
|
||||
() => new Promise<boolean>((resolve) => { resolveLogin = resolve })
|
||||
() =>
|
||||
new Promise<boolean>((resolve) => {
|
||||
resolveLogin = resolve
|
||||
})
|
||||
)
|
||||
mockSessionManager.getUserInfo.mockReturnValue({
|
||||
id: user.id,
|
||||
@@ -213,10 +216,7 @@ describe('AuthApplicationService', () => {
|
||||
|
||||
describe('getAllUsers', () => {
|
||||
it('should delegate to session manager', async () => {
|
||||
const users = [
|
||||
UserFactory.createAdmin(),
|
||||
UserFactory.createUserDefault()
|
||||
]
|
||||
const users = [UserFactory.createAdmin(), UserFactory.createUserDefault()]
|
||||
mockSessionManager.getAllUsers.mockResolvedValue(users)
|
||||
|
||||
const result = await service.getAllUsers()
|
||||
|
||||
@@ -134,9 +134,7 @@ describe('ValidationApplicationService', () => {
|
||||
filteredMaterialRecords = [
|
||||
{ MaterialName: 'FilteredMat', MaterialCode: 'MF1', Model: 'FMod', Specification: 'FSpec' }
|
||||
]
|
||||
materialsByManagerResult = [
|
||||
{ materialCode: 'M1', managerName: 'Mgr' }
|
||||
]
|
||||
materialsByManagerResult = [{ materialCode: 'M1', managerName: 'Mgr' }]
|
||||
allMaterialsResult = [
|
||||
{ materialCode: 'M1', managerName: 'Mgr' },
|
||||
{ materialCode: 'M2', managerName: 'Other' }
|
||||
@@ -347,7 +345,8 @@ describe('ValidationApplicationService', () => {
|
||||
})
|
||||
|
||||
it('should handle errors gracefully', async () => {
|
||||
const { createValidationDatabaseService } = await import('../../../../src/main/services/validation/validation-database')
|
||||
const { createValidationDatabaseService } =
|
||||
await import('../../../../src/main/services/validation/validation-database')
|
||||
vi.mocked(createValidationDatabaseService).mockRejectedValueOnce(new Error('DB down'))
|
||||
|
||||
const userInfo = { id: 1, username: 'admin', userType: 'Admin' } as any
|
||||
|
||||
Reference in New Issue
Block a user