ionic-mocks
ionic-mocks copied to clipboard
Testing
Not completely sure how this would work. Instantiate a spy and check the member exists and returns the right type, should be simple enough. Would be nice to reference Ionic type and iterate over members to check if exists.
I want to keep this open as the nature of this project, essentially (shallowly) mirroring a much larger project, presents some challenges and the current method of testing may be more work than it's really worth. https://github.com/stonelasley/ionic-mocks/blob/master/src/angular/platform.spec.ts
Just a wild thought: It would be nice to be able to fetch the ionic-type during build-time. Then iterate over it to find implementation that are mocked, not mocked, or that are mocked and no longer exist. That way you could even make a progress report as to how far the mock-implementation is.
Maybe even generate default mocks based on the type for implementations that do not yet exist. (interesting stuff) :-)