0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-31 22:51:25 -05:00

test: wait 0ms after each test

This commit is contained in:
Gao Sun 2024-03-28 16:26:58 +08:00
parent 3f152a8cab
commit 0ade3016d8
No known key found for this signature in database
GPG key ID: 13EBE123E4773688
2 changed files with 18 additions and 1 deletions

View file

@ -25,10 +25,21 @@ import {
import { clearConnectorsByTypes } from '#src/helpers/connector.js';
import { createUserByAdmin, expectRejects } from '#src/helpers/index.js';
import { createNewSocialUserWithUsernameAndPassword } from '#src/helpers/interactions.js';
import { generateUsername, generateEmail, generatePhone, generatePassword } from '#src/utils.js';
import {
generateUsername,
generateEmail,
generatePhone,
generatePassword,
waitFor,
} from '#src/utils.js';
const randomString = () => crypto.randomBytes(8).toString('hex');
afterEach(async () => {
// Try to mitigate the issue of "Socket hang up". See https://github.com/nodejs/node/issues/47130
await waitFor(0);
});
describe('admin console user management', () => {
beforeAll(async () => {
await clearConnectorsByTypes([ConnectorType.Social]);

View file

@ -23,6 +23,12 @@ import {
enableAllPasswordSignInMethods,
} from '#src/helpers/sign-in-experience.js';
import { generateNewUserProfile, generateNewUser } from '#src/helpers/user.js';
import { waitFor } from '#src/utils.js';
afterEach(async () => {
// Try to mitigate the issue of "Socket hang up". See https://github.com/nodejs/node/issues/47130
await waitFor(0);
});
describe('register with username and password', () => {
it('register with username and password', async () => {