mirror of
https://github.com/nocobase/nocobase.git
synced 2026-09-24 16:02:20 +08:00
fix: flow model test error
This commit is contained in:
@@ -705,7 +705,7 @@ describe('FlowModel', () => {
|
||||
TestFlowModelWithHooks.registerFlow(errorFlow);
|
||||
|
||||
const modelWithHooks = new TestFlowModelWithHooks(modelOptions);
|
||||
await modelWithHooks.dispatchEvent('beforeRender');
|
||||
await expect(modelWithHooks.dispatchEvent('beforeRender')).rejects.toThrow('Test error');
|
||||
// Verify hooks were called (error path)
|
||||
expect(beforeHookSpy).toHaveBeenCalledTimes(1);
|
||||
expect(afterHookSpy).not.toHaveBeenCalled();
|
||||
|
||||
Reference in New Issue
Block a user