From 24784db6fae4c5f0425f3e77dcac7a3ad122ef2a Mon Sep 17 00:00:00 2001 From: Abby Wheelis Date: Wed, 1 Nov 2023 13:48:55 -0600 Subject: [PATCH] add timeout to config mock I had originally omitted the timeout because it seemed to break the test, but upon having the tests fully working, I was able to restore it this change makes the test code a little more realistic --- www/__mocks__/cordovaMocks.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/__mocks__/cordovaMocks.ts b/www/__mocks__/cordovaMocks.ts index 2c45e2a20..9b8980c37 100644 --- a/www/__mocks__/cordovaMocks.ts +++ b/www/__mocks__/cordovaMocks.ts @@ -127,7 +127,9 @@ export const mockBEMDataCollection = () => { }, getConfig: () => { return new Promise((rs, rj) => { - rs({ 'ios_use_remote_push_for_sync': true }); + setTimeout(() => { + rs({ 'ios_use_remote_push_for_sync': true }); + }, 100) }); }, handleSilentPush: () => {