feat: add asynchronous inventory exports
Quality / test (push) Canceled after 0s

This commit is contained in:
2026-09-10 01:25:11 -04:00
parent abb0b64217
commit 7c4885cf65
16 changed files with 269 additions and 1 deletions
+15
View File
@@ -70,6 +70,21 @@ test('archives selected admin inventory items through the bulk API', async () =>
}
});
test('fetches an admin inventory export job through the bulk job API', async () => {
const originalFetch = globalThis.fetch;
globalThis.fetch = async (url, options) => {
assert.equal(url, '/api/v1/admin/exports/jobs/job-1');
return { ok: true, async json() { return { data: { id: 'job-1', status: 'COMPLETED' } }; } };
};
try {
const { getAdminInventoryExportJob } = await import('../src/services/admin-catalog-service.js');
assert.deepEqual(await getAdminInventoryExportJob('job-1'), { id: 'job-1', status: 'COMPLETED' });
} finally {
globalThis.fetch = originalFetch;
}
});
test('enqueues selected admin inventory pricing refreshes through the bulk API', async () => {
const originalFetch = globalThis.fetch;
globalThis.fetch = async (url, options) => {