mirror of
https://github.com/prymitive/karma
synced 2026-05-19 04:26:41 +00:00
fix(tests): add test coverage for missed branches in AlertGrid
This commit is contained in:
@@ -89,6 +89,15 @@ describe("<AlertGrid />", () => {
|
||||
expect(instance.masonryComponentReference.ref.forcePack).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("masonryRepack() doesn't crash when masonryComponentReference.ref=false`", () => {
|
||||
const tree = ShallowAlertGrid();
|
||||
const instance = tree.instance();
|
||||
const repackSpy = jest.spyOn(instance, "masonryRepack");
|
||||
instance.masonryComponentReference.ref = false;
|
||||
instance.componentDidUpdate();
|
||||
expect(repackSpy).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("calling storeMasonryRef() saves the ref in local store", () => {
|
||||
const tree = ShallowAlertGrid();
|
||||
const instance = tree.instance();
|
||||
|
||||
Reference in New Issue
Block a user