ionic-mocks icon indicating copy to clipboard operation
ionic-mocks copied to clipboard

Testing

Open stonelasley opened this issue 7 years ago • 2 comments

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.

stonelasley avatar Aug 02 '17 17:08 stonelasley

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

stonelasley avatar Aug 18 '17 18:08 stonelasley

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) :-)

Remco75 avatar Oct 11 '17 07:10 Remco75