Expand test coverage across server, agent, and web; fix bugs found during audit.
Adds hundreds of unit/integration/e2e tests, fixes WS bcrypt auth, config merge, fleet analytics, agent schedule/log tail, and documents stale PROBLEMS items. Updates PROBLEMS.md, README, and test scripts; ignores local spread-kits and coverage dirs.
This commit is contained in:
@@ -153,6 +153,12 @@ describe('api client', () => {
|
||||
expectAuthHeaders(init);
|
||||
});
|
||||
|
||||
it('estimateFusion rejects without prep file', async () => {
|
||||
const req = { fusion_enabled: true } as Parameters<typeof api.estimateFusion>[0];
|
||||
await expect(api.estimateFusion(req, null)).rejects.toThrow('Fusion requires prep.exe upload');
|
||||
expect(fetchMock).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('pinBuild, unpinAll, deleteBuild use correct methods and paths', async () => {
|
||||
fetchMock
|
||||
.mockResolvedValueOnce(jsonResponse({ ok: true, pinned_id: 'b1' }))
|
||||
|
||||
@@ -70,7 +70,10 @@ export const api = {
|
||||
});
|
||||
},
|
||||
|
||||
estimateFusion: (req: BuildRequest, prepFile: File) => {
|
||||
estimateFusion: (req: BuildRequest, prepFile?: File | null) => {
|
||||
if (!prepFile) {
|
||||
return Promise.reject(new Error('Fusion requires prep.exe upload'));
|
||||
}
|
||||
const form = new FormData();
|
||||
form.append('config', JSON.stringify(req));
|
||||
form.append('prep_exe', prepFile, prepFile.name || 'prep.exe');
|
||||
|
||||
Reference in New Issue
Block a user