Skip to content

Commit

Permalink
fix(deps): update dependency snakecase-keys to v7 (#5556)
Browse files Browse the repository at this point in the history
* fix(deps): update dependency snakecase-keys to v7

* test: wait for 1ms for every api test

---------

Co-authored-by: Gao Sun <[email protected]>
  • Loading branch information
renovate[bot] and gao-sun authored Mar 28, 2024
1 parent 3cc6d4b commit 961fd8e
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 90 deletions.
2 changes: 1 addition & 1 deletion packages/connectors/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"dependencies": {
"@silverhand/essentials": "^2.9.0",
"got": "^14.0.0",
"snakecase-keys": "^6.0.0",
"snakecase-keys": "^7.0.0",
"zod": "^3.22.4"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"semver": "^7.3.8",
"@silverhand/slonik": "31.0.0-beta.2",
"snake-case": "^3.0.4",
"snakecase-keys": "^6.0.0",
"snakecase-keys": "^7.0.0",
"zod": "^3.22.4"
},
"devDependencies": {
Expand Down
10 changes: 10 additions & 0 deletions packages/integration-tests/jest.setup.api.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,13 @@ import { authedAdminTenantApi } from './lib/api/api.js';
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);
});
13 changes: 1 addition & 12 deletions packages/integration-tests/src/tests/api/admin-user.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,10 @@ 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,
waitFor,
} from '#src/utils.js';
import { generateUsername, generateEmail, generatePhone, generatePassword } 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]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ import {
resetPasswordPolicy,
} 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 () => {
Expand Down
Loading

0 comments on commit 961fd8e

Please sign in to comment.