ionic-team / ionic-native-google-maps

Google maps plugin for Ionic Native
Other
221 stars 125 forks source link

Test additional error states. Speed up the tests. #109

Closed adamduren closed 5 years ago

adamduren commented 5 years ago

Added a mockCordovaRestore function to be used in the afterEach when cordova or plugins are mocked.

Added a optional constructor parameter called elFindTimeout so that the time searching for an element can be changed. Useful for testing error states. Improved test time by 33% but would have greater impact with more tests as previously each test of error state took at least the length of the timeout of 2000ms.

Open to other ideas of achieving this if the proposed solution is not desired.

adamduren commented 5 years ago

Will be adding a couple of tests to validate logic of configurable timeout shortly.

adamduren commented 5 years ago

Stopped using nextId() as it'll make the tests and snapshots more deterministic as tests are shuffled around. Ready for review.

wf9a5m75 commented 5 years ago

Thank you for creating test cases. I added one singe comment line at GoogleMap class.