Simple test doubles for Ionic 2+ using Jasmine Spy Objects
This project is still very early in development and there are several things I'm sorting out. However since this is only meant to be used in your tests it should be safe to pull into a project.
- KeyBoard - exported as IonKeyboard
npm install --save-dev ionic-mocks
Pre-mocked return types
Override ionic providers in TestingModule
This project has a long way to go and is full of opportunities to contribute. I am back in school and working so for the rest of the year expect my responsiveness on this project to be slow. If anyone is up to helping vet PRs please message me. email@example.com
Frequently Asked Questions:
Q: I am receiving a
TypeError: jit__object_Object_33 is not a function error. What does that mean?
Answer: This means you've done something wrong. Take a look at this example:
// DO NOT DO THIS// USING useClass INSTEAD OF useFactory IS INCORRECT
// DO NOT DO THIS// USING useFactory WITHOUT THE FAT ARROW SYNTAX IS INCORRECT
Make sure you are using the
useFactory property name and using the fat arrow function as the value:
// DO THIS