We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
I'm trying to use MenuControllerMock like so in my component test:
I get this error in the console:
I found out that if I add the _unregister() method in the mock (ionic-mocks/dist/angular/menu-controller.js), the error disappears:
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?
The text was updated successfully, but these errors were encountered: