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