mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
fix: enhance authentication error handling in Claude usage service tests
- Updated test to send a specific authentication error pattern to the data callback. - Triggered the exit handler to validate the handling of authentication errors. - Improved error message expectations for better clarity during test failures.
This commit is contained in:
@@ -518,7 +518,11 @@ Resets in 2h
|
||||
|
||||
const promise = ptyService.fetchUsageData();
|
||||
|
||||
dataCallback!('authentication_error');
|
||||
// Send data containing the authentication error pattern the service looks for
|
||||
dataCallback!('"type":"authentication_error"');
|
||||
|
||||
// Trigger the exit handler which checks for auth errors
|
||||
exitCallback!({ exitCode: 1 });
|
||||
|
||||
await expect(promise).rejects.toThrow(
|
||||
"Claude CLI authentication issue. Please run 'claude logout' and then 'claude login' in your terminal to refresh permissions."
|
||||
|
||||
Reference in New Issue
Block a user