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
renovate[bot] 961fd8ea99
fix(deps): update dependency snakecase-keys to v7 (#5556)
* fix(deps): update dependency snakecase-keys to v7

* test: wait for 1ms for every api test

---------

Co-authored-by: Gao Sun <gao@silverhand.io>
2024-03-28 18:16:00 +08:00

17 lines
533 B
JavaScript

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);
});