Skip to content

Commit

Permalink
fix(test): fix the integartion tests
Browse files Browse the repository at this point in the history
fix the integration tests
  • Loading branch information
simeng-li committed May 15, 2024
1 parent e1d337e commit efb41a4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
enableAllVerificationCodeSignInMethods,
} from '#src/helpers/sign-in-experience.js';
import { UserApiTest, generateNewUserProfile } from '#src/helpers/user.js';
import { generateEmail, generatePassword } from '#src/utils.js';
import { generateEmail, generatePassword, waitFor } from '#src/utils.js';

import WebhookMockServer, { mockHookResponseGuard, verifySignature } from './WebhookMockServer.js';

Expand All @@ -47,6 +47,9 @@ const assertHookLogResult = async (
hookPayload?: Record<string, unknown>;
}
) => {
// Since the webhook request is async, we need to wait for a while to ensure the webhook response is received.
await waitFor(50);

const logs = await getWebhookRecentLogs(
hookId,
new URLSearchParams({ logKey: `TriggerHook.${event}`, page_size: '10' })
Expand Down

0 comments on commit efb41a4

Please sign in to comment.