This commit is contained in:
2026-05-09 18:24:08 +08:00
parent a0ed128bde
commit bc704d0c22
38 changed files with 481 additions and 378 deletions

View File

@@ -15,6 +15,12 @@ import {
} from './rpgProfileClient';
vi.mock('../apiClient', () => ({
BACKGROUND_AUTH_REQUEST_OPTIONS: {
authImpact: 'local',
skipRefresh: true,
notifyAuthStateChange: false,
clearAuthOnUnauthorized: false,
},
requestJson: requestJsonMock,
}));
@@ -32,7 +38,11 @@ describe('rpgProfileClient browse history routes', () => {
expect.objectContaining({ method: 'GET' }),
'读取浏览历史失败',
expect.objectContaining({
authImpact: 'local',
retry: expect.objectContaining({ maxRetries: 1 }),
skipRefresh: true,
notifyAuthStateChange: false,
clearAuthOnUnauthorized: false,
}),
);
});
@@ -57,10 +67,14 @@ describe('rpgProfileClient browse history routes', () => {
}),
'写入浏览历史失败',
expect.objectContaining({
authImpact: 'local',
retry: expect.objectContaining({
maxRetries: 1,
retryUnsafeMethods: true,
}),
skipRefresh: true,
notifyAuthStateChange: false,
clearAuthOnUnauthorized: false,
}),
);
});
@@ -121,7 +135,11 @@ describe('rpgProfileClient save archive routes', () => {
expect.objectContaining({ method: 'GET' }),
'读取存档列表失败',
expect.objectContaining({
authImpact: 'local',
retry: expect.objectContaining({ maxRetries: 1 }),
skipRefresh: true,
notifyAuthStateChange: false,
clearAuthOnUnauthorized: false,
}),
);
});