-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
Hello,
I'm trying to use MenuControllerMock like so in my component test:
import {MenuControllerMock} from 'ionic-mocks';
providers: [{provide: MenuController, useFactory: () => MenuControllerMock.instance()}]I get this error in the console:
ERROR: 'Error during cleanup of component'
I found out that if I add the _unregister() method in the mock (ionic-mocks/dist/angular/menu-controller.js), the error disappears:
var instance = jasmine.createSpyObj('MenuController', ['close', 'enable', 'get', 'getMenus', 'getOpen', 'isEnabled', 'isOpen', 'open', 'swipeEnable', 'toggle', '_unregister']);
instance._unregister.and.returnValue(true);I cannot imagine you've never encountered my issue, so I'm thinking I missed something.
Do you have any idea why I get this error during cleanup of the component?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels