Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #376 from jhellar/push-test-timeout
Browse files Browse the repository at this point in the history
increased timeout for push-registration test
  • Loading branch information
jhellar authored Jun 3, 2019
2 parents 1bd3196 + 68d37b1 commit c16e583
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions packages/push/test/PushRegistrationTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,23 @@ describe("Registration tests", () => {

describe("#register", async () => {
it("should fail to register in push server", async () => {
registration.register(undefined as unknown as string, "cordova", ["Test"]).then(() => {
try {
await registration.register(undefined as unknown as string, "cordova", ["Test"]);
assert.fail();
}).catch(() => {
} catch (_) {
return "ok";
});
}
});

it("should register in push server", async () => {
return registration.register("token", "cordova", ["Test"]).catch((error) => {
it("should register in push server", async function() {
// in CI environment this test sometimes fails because of the default timeout 2s
// increase timeout to 10s
this.timeout(10000);
try {
await registration.register("token", "cordova", ["Test"]);
} catch (error) {
assert.fail(error);
});
}
});
});
});

0 comments on commit c16e583

Please sign in to comment.