0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00
logto/packages/integration-tests/jest.setup.api.js

18 lines
533 B
JavaScript
Raw Normal View History

import { authedAdminTenantApi } from './lib/api/api.js';
// We need to update this before tests otherwise Logto will update SignInMode for admin tenant
// The update logic should be
await authedAdminTenantApi.patch('sign-in-exp', {
json: { signInMode: 'SignInAndRegister' },
});
const waitFor = async (ms) =>
new Promise((resolve) => {
setTimeout(resolve, ms);
});
global.afterEach(async () => {
// Try to mitigate the issue of "Socket hang up". See https://github.com/nodejs/node/issues/47130
await waitFor(1);
});