Initial project documentation and status

This commit is contained in:
Clawdia
2026-08-30 14:46:23 -04:00
commit 765f372c72
50 changed files with 12916 additions and 0 deletions
@@ -0,0 +1,38 @@
/**
* Tests for the mock data loader.
*/
import { loadTestDeviceData } from './mock-data-loader';
describe('MockDataLoader', () => {
it('should load test device data from JSON file', () => {
const data = loadTestDeviceData();
expect(Array.isArray(data.devices)).toBe(true);
expect(Array.isArray(data.groups)).toBe(true);
expect(data.devices.length).toBeGreaterThan(0);
expect(data.groups.length).toBeGreaterThan(0);
});
it('should load valid device structures', () => {
const data = loadTestDeviceData();
for (const device of data.devices) {
expect(typeof device.id).toBe('string');
expect(typeof device.name).toBe('string');
expect(typeof device.groupId).toBe('string');
expect(typeof device.groupName).toBe('string');
expect(['online', 'offline', 'unknown']).toContain(device.status);
}
});
it('should load valid group structures', () => {
const data = loadTestDeviceData();
for (const group of data.groups) {
expect(typeof group.id).toBe('string');
expect(typeof group.name).toBe('string');
expect(typeof group.deviceCount).toBe('number');
}
});
});