Add tests for iOS loop push notifications and websockets#8419
Open
je-l wants to merge 8 commits intonightscout:devfrom
Open
Add tests for iOS loop push notifications and websockets#8419je-l wants to merge 8 commits intonightscout:devfrom
je-l wants to merge 8 commits intonightscout:devfrom
Conversation
Member
|
Thanks for the PR. The additional coverage looks useful, but I think this needs revision before merge. A few issues should be addressed first:
If you can make the new tests fully self-contained and deterministic, I’d be happy to take another look. |
Duplicated behavior between websocket.test.js and websocket.shape-handling.test.js.
Also use dynamic port for the fake APNs backend. See nightscout#8419 (comment)
Author
|
Pushed fixes to all three comments, the teardown looks like this now: after(function(done) {
inst.server.close();
inst.ctx.bus.teardown();
delete process.env.LOOP_APNS_KEY;
delete process.env.LOOP_APNS_KEY_ID;
delete process.env.LOOP_DEVELOPER_TEAM_ID;
delete process.env.ENABLE;
apn.Provider = OriginalApnProviderClass;
guardedDrop(inst.ctx.profile(), err => {
if (err) return done(err)
fakeAPNServer.close(done);
});
});I removed websocket.test.js, the overlap is high with websocket.shape-handling.test.js. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds high-level integration tests related to iOS loop push notifications and websocket API. This should help with e.g. dependency updates and to avoid introducing regression bugs when making changes.
Statement coverage increased from 63.8% to 65.4%.
Branch coverage from 51.0% to 53.0%.