- Add support for Frigate reviews / detections. - Add support for GenAI metadata. - Significant internal refactor to more flexible "UnifiedQuery" to allow mixing cameras with simple metadata and review metadata (e.g. a timeline view of a Frigate camera with reviews, and a Reolink camera with simple metadata). - Add support for folder media as camera media. There are a few more PRs to commit prior to this going live, but commiting this for now due to the scale of the change. BREAKING CHANGE: `media_type` and `events_type` are retired under `live`, `viewer` and `timeline` configuration sections, instead media type is associated (once) with the camera under `media`.
25 lines
710 B
TypeScript
25 lines
710 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import { getFolderID } from '../../src/utils/folder';
|
|
|
|
describe('getFolderID', () => {
|
|
it('should get folder id from config', () => {
|
|
expect(getFolderID({ id: 'my-folder' })).toBe('my-folder');
|
|
});
|
|
|
|
it('should get folder id from index when no id in config', () => {
|
|
expect(getFolderID({}, 5)).toBe('folder/5');
|
|
});
|
|
|
|
it('should use default index 0 when index is missing', () => {
|
|
expect(getFolderID({})).toBe('folder/0');
|
|
});
|
|
|
|
it('should handle null config', () => {
|
|
expect(getFolderID(null, 2)).toBe('folder/2');
|
|
});
|
|
|
|
it('should handle undefined config', () => {
|
|
expect(getFolderID(undefined, 3)).toBe('folder/3');
|
|
});
|
|
});
|