Refactor views to support dynamic updates.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { expect, it } from 'vitest';
|
||||
import { SubstreamOffAction } from '../../../../src/card-controller/actions/actions/substream-off';
|
||||
import { createCardAPI } from '../../../test-utils';
|
||||
import { SubstreamOffViewModifier } from '../../../../src/card-controller/view/modifiers/substream-off';
|
||||
|
||||
it('should handle live_substream_off action', async () => {
|
||||
const api = createCardAPI();
|
||||
@@ -14,5 +15,7 @@ it('should handle live_substream_off action', async () => {
|
||||
|
||||
await action.execute(api);
|
||||
|
||||
expect(api.getViewManager().setViewWithoutSubstream).toBeCalled();
|
||||
expect(api.getViewManager().setViewByParameters).toBeCalledWith({
|
||||
modifiers: [expect.any(SubstreamOffViewModifier)],
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user