Fix data exports UI and scope format
This commit is contained in:
22
resources/js/admin/mobile/lib/dataExports.test.ts
Normal file
22
resources/js/admin/mobile/lib/dataExports.test.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { hasInProgressExports } from './dataExports';
|
||||
|
||||
describe('dataExports helpers', () => {
|
||||
it('detects in-progress exports', () => {
|
||||
const result = hasInProgressExports([
|
||||
{ id: 1, status: 'pending' } as any,
|
||||
{ id: 2, status: 'ready' } as any,
|
||||
]);
|
||||
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
|
||||
it('returns false when exports are terminal', () => {
|
||||
const result = hasInProgressExports([
|
||||
{ id: 1, status: 'ready' } as any,
|
||||
{ id: 2, status: 'failed' } as any,
|
||||
]);
|
||||
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user