ionic-mocks
ionic-mocks copied to clipboard
Version 3
I'm trying to get this repo caught up ASAP as I've been playing in NestJS world and ionic hasn't been on my radar.
V3
- I'm currently working on updating all mocks to a new class structure that lends itself to more natural use. the static instance method is still there but is deprecated and will eventually be removed.
- IMPORTANT - We began to introduce some complexity to the mocks in what I think was an effort to make the project more feature rich at the expense of making it more focused. I am backing away from that and really focusing on providing mocks as a starting point. My opinion (which is always subject to question) is that these mocks should really just give you a starting point. If you want to test a callback on a function, you should expect that the function is stubbed but you should be setting the return value.
- Jest Support, I have not started on this and I'm very green regarding Jest but I have a project or two where I'm using it and I've started centralizing jasmine into a BaseMock that should allow swapping frameworks. jasmine is still leaking out a bit but I think I have an idea.
If anyone has any free time please look at branch version-3 and feel free to help out. I want to get V3 out and then immediately start on 4 in hopes of being ready when ionic4 lands.
Do you think it makes sense to write unit tests for the instance method ? I know is being deprecated, but if is in the project, I guess it should be tested.
I started writing tests to try to reach 100% coverage. Should I work on branch version-3 ?