refactor(core): Make external hooks type-safe, and add tests (#12893)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2025-01-29 10:33:39 +01:00
committed by GitHub
parent 3d27a14987
commit 05b5f95331
17 changed files with 289 additions and 150 deletions

View File

@@ -76,10 +76,7 @@ describe('init()', () => {
it('should call external hook', async () => {
await activeWorkflowManager.init();
const [hook, arg] = externalHooks.run.mock.calls[0];
expect(hook).toBe('activeWorkflows.initialized');
expect(arg).toBeEmptyArray();
expect(externalHooks.run).toHaveBeenCalledWith('activeWorkflows.initialized');
});
it('should check that workflow can be activated', async () => {