test: Split test utilities to improve test times (#2622)

This commit is contained in:
Dermot Duffy
2026-07-26 16:29:53 -07:00
committed by GitHub
parent 8d44fcecf1
commit ad89aa9538
234 changed files with 2730 additions and 2516 deletions
+4 -4
View File
@@ -11,7 +11,7 @@ import { conditionSchema } from '../../src/config/schema/condition-trigger/condi
import { dimensionsConfigSchema } from '../../src/config/schema/dimensions';
import { customSchema } from '../../src/config/schema/elements/stock/custom';
import { conditionalSchema } from '../../src/config/schema/elements/types';
import { createConfig } from '../test-utils';
import { createConfig } from './test-utils';
describe('config defaults', () => {
it('should be as expected', () => {
@@ -1342,7 +1342,7 @@ describe('should refine user_agent_re conditions', () => {
condition: 'user_agent',
user_agent_re: '[',
}),
).toThrowError(/Invalid regular expression/);
).toThrow(/Invalid regular expression/);
});
});
@@ -1885,7 +1885,7 @@ it('media viewer should not support microphone based conditions', () => {
auto_unmute: 'microphone' as const,
},
}),
).toThrowError();
).toThrow();
});
describe('automations should require actions', () => {
@@ -1895,7 +1895,7 @@ describe('automations should require actions', () => {
cameras: [{}],
automations: [{ triggers: [{ trigger: 'initialized' }], conditions: [] }],
}),
).toThrowError();
).toThrow();
});
});