aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/users.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-17 15:25:58 +0200
committerChocobozzz <me@florianbigard.com>2022-08-17 15:25:58 +0200
commitbbd5aa7ead5f1554a0872963f957effc26d8c630 (patch)
treea32cad420cfabe4eab5df4e3f104fa34f734fa7d /server/tests/api/check-params/users.ts
parenta85d530384761a0af833caac9b38b9834517c9fa (diff)
downloadPeerTube-bbd5aa7ead5f1554a0872963f957effc26d8c630.tar.gz
PeerTube-bbd5aa7ead5f1554a0872963f957effc26d8c630.tar.zst
PeerTube-bbd5aa7ead5f1554a0872963f957effc26d8c630.zip
Reimplement a typed omit function
Diffstat (limited to 'server/tests/api/check-params/users.ts')
-rw-r--r--server/tests/api/check-params/users.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts
index 4c4f54958..7acfd8c2c 100644
--- a/server/tests/api/check-params/users.ts
+++ b/server/tests/api/check-params/users.ts
@@ -1,8 +1,6 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2
3import 'mocha'
4import { omit } from 'lodash'
5import { MockSmtpServer } from '@server/tests/shared' 2import { MockSmtpServer } from '@server/tests/shared'
3import { omit } from '@shared/core-utils'
6import { HttpStatusCode, UserRole } from '@shared/models' 4import { HttpStatusCode, UserRole } from '@shared/models'
7import { cleanupTests, createSingleServer, makePostBodyRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands' 5import { cleanupTests, createSingleServer, makePostBodyRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
8 6
@@ -57,7 +55,7 @@ describe('Test users API validators', function () {
57 }) 55 })
58 56
59 it('Should fail with a missing email', async function () { 57 it('Should fail with a missing email', async function () {
60 const fields = omit(baseCorrectParams, 'email') 58 const fields = omit(baseCorrectParams, [ 'email' ])
61 59
62 await makePostBodyRequest({ url: server.url, path: registrationPath, token: server.accessToken, fields }) 60 await makePostBodyRequest({ url: server.url, path: registrationPath, token: server.accessToken, fields })
63 }) 61 })