Skip to content

Commit

Permalink
test: fix error with username
Browse files Browse the repository at this point in the history
  • Loading branch information
CaduGomes committed Jan 8, 2024
1 parent a2df68c commit 3acb76f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions __test__/metadata/User/updateUser.test.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { expect } from 'chai';
import { login } from '../../utils/login';
import { KonectyResponse } from '../../utils/types';

import { faker } from '@faker-js/faker';
async function createUserHelper(authId: string) {
const requiredFields = {
name: 'Teste',
name: faker.internet.userName(),
active: true,
group: { _id: 'YM3utZ6EMmrFsbHZc', name: 'User' },
role: { _id: 'Fr9y2Gc6xisQ3NkEu', name: 'User' },
locale: 'pt_BR',
username: 'teste',
username: faker.internet.userName(),
};
const data = (await fetch(`http://127.0.0.1:3000/rest/data/User`, {
method: 'POST',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
"@babel/preset-typescript": "^7.23.2",
"@commitlint/cli": "^18.2.0",
"@commitlint/config-conventional": "^18.1.0",
"@faker-js/faker": "^8.3.1",
"@swc/core": "^1.3.95",
"@swc/jest": "^0.2.29",
"@tsconfig/bun": "^1.0.1",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1833,6 +1833,11 @@
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.52.0.tgz#78fe5f117840f69dc4a353adf9b9cd926353378c"
integrity sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==

"@faker-js/faker@^8.3.1":
version "8.3.1"
resolved "https://registry.yarnpkg.com/@faker-js/faker/-/faker-8.3.1.tgz#7753df0cb88d7649becf984a96dd1bd0a26f43e3"
integrity sha512-FdgpFxY6V6rLZE9mmIBb9hM0xpfvQOSNOLnzolzKwsE1DH+gC7lEKV1p1IbR0lAYyvYd5a4u3qWJzowUkw1bIw==

"@fastify/accept-negotiator@^1.0.0":
version "1.1.0"
resolved "https://registry.npmjs.org/@fastify/accept-negotiator/-/accept-negotiator-1.1.0.tgz#c1c66b3b771c09742a54dd5bc87c582f6b0630ff"
Expand Down

0 comments on commit 3acb76f

Please sign in to comment.