Add test.
This commit is contained in:
1 parent
b99628d5ee
commit
1f70866ce6
1 file changed
+6
@@ -113,6 +113,12 @@ describe('View Basics', () => {
|
|||||||
view.mergeInContext({ timeline: timelineContext });
|
view.mergeInContext({ timeline: timelineContext });
|
||||||
expect(view.context?.live).toEqual(liveContext);
|
expect(view.context?.live).toEqual(liveContext);
|
||||||
expect(view.context?.timeline).toEqual(timelineContext);
|
expect(view.context?.timeline).toEqual(timelineContext);
|
||||||
|
|
||||||
|
// Verify that merging context creates a new context object, as some
|
||||||
|
// downstream users may check for context equality.
|
||||||
|
const oldContext = view.context;
|
||||||
|
view.mergeInContext({ live: liveContext });
|
||||||
|
expect(view.context).not.toBe(oldContext);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should remove context', () => {
|
it('should remove context', () => {
|
||||||
|
|||||||
Reference in new issue
Block a user