test: add config validation and viewer integration tests
CI / test (pull_request) Failing after 26s

- Config validation suite (43 tests): verify HLS grid config, manifest
  dedup, video entry normalization, storage pipeline metadata preservation
- Viewer integration tests (30 tests): panel rendering for HLS/direct
  entries, edge cases (empty manifests, missing fields, mixed grids)
- Tests mirror current pipeline functions (not outdated code)
This commit is contained in:
robot committed 2026-08-12 00:20:36 +00:00
1 parent d86c1d1778
commit 7276824758
5 files changed
+943 -2

No files matched your search

+2 -2
View File
@@ -62,7 +62,7 @@ function createBrowserEnv({ storageData = {}, url = 'https://example.com/viewer/
// 'native' mode sets HLS = undefined so viewer.js takes the Safari native path.
const hlsCalls = { instances: [], loaded: false };
if (hlsMode === 'mocked') {
win.HLS = class MockHLS {
win.Hls = class MockHLS {
constructor(opts) {
hlsCalls.instances.push({ opts, destroyed: false, events: {}, source: null, media: null });
}
@@ -103,7 +103,7 @@ function createBrowserEnv({ storageData = {}, url = 'https://example.com/viewer/
} else if (hlsMode === 'native') {
// Simulate Safari — window.HLS exists but isSupported() returns false.
// viewer.js then falls through to video.src = manifestUrl (native HLS).
win.HLS = class MockHLS_Native {
win.Hls = class MockHLS_Native {
static isSupported() {
return false; // Safari has native HLS, Hls.js is not needed
}