style: apply prettier formatting

Apply consistent formatting across all files (line endings, spacing)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Misaka
2026-03-01 14:57:38 +08:00
parent 8f6ca7b453
commit c39e1504aa
17 changed files with 631 additions and 634 deletions

View File

@@ -1,6 +1,6 @@
import { describe, it, expect, beforeEach } from 'vitest';
import { ErpAuthService } from '../../src/main/services/erp/erp-auth';
import type { ErpConfig } from '../../src/main/types/erp.types';
import { describe, it, expect, beforeEach } from 'vitest'
import { ErpAuthService } from '../../src/main/services/erp/erp-auth'
import type { ErpConfig } from '../../src/main/types/erp.types'
describe('ERP Authentication Service (Unit)', () => {
describe('Session Management', () => {
@@ -8,52 +8,52 @@ describe('ERP Authentication Service (Unit)', () => {
const config: ErpConfig = {
url: 'https://test.example.com',
username: 'testuser',
password: 'testpass',
};
password: 'testpass'
}
const service = new ErpAuthService(config);
const service = new ErpAuthService(config)
expect(service).toBeDefined();
expect(service.isActive()).toBe(false);
});
expect(service).toBeDefined()
expect(service.isActive()).toBe(false)
})
it('should throw error when getting session before login', () => {
const config: ErpConfig = {
url: 'https://test.example.com',
username: 'testuser',
password: 'testpass',
};
password: 'testpass'
}
const service = new ErpAuthService(config);
const service = new ErpAuthService(config)
expect(() => service.getSession()).toThrow('Not logged in. Call login() first.');
});
expect(() => service.getSession()).toThrow('Not logged in. Call login() first.')
})
it('should report inactive status before login', () => {
const config: ErpConfig = {
url: 'https://test.example.com',
username: 'testuser',
password: 'testpass',
};
password: 'testpass'
}
const service = new ErpAuthService(config);
const service = new ErpAuthService(config)
expect(service.isActive()).toBe(false);
});
});
expect(service.isActive()).toBe(false)
})
})
describe('Close Method', () => {
it('should handle close when no session exists', async () => {
const config: ErpConfig = {
url: 'https://test.example.com',
username: 'testuser',
password: 'testpass',
};
password: 'testpass'
}
const service = new ErpAuthService(config);
const service = new ErpAuthService(config)
// Should not throw when closing without session
await expect(service.close()).resolves.toBeUndefined();
});
});
});
await expect(service.close()).resolves.toBeUndefined()
})
})
})