X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fcheck-params%2Fuser-notifications.ts;h=6a588e4460a585ea056b67feded539289d1a40c3;hb=458685e0d039a0ad3fa4f26d99746f7d6d0b40e9;hp=4bc8084a1de5a1be7ff5740d85793ce1f97fb78e;hpb=c55e3d7227fe1453869e309025996b9d75256d5d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/check-params/user-notifications.ts b/server/tests/api/check-params/user-notifications.ts index 4bc8084a1..6a588e446 100644 --- a/server/tests/api/check-params/user-notifications.ts +++ b/server/tests/api/check-params/user-notifications.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { io } from 'socket.io-client' import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared' import { wait } from '@shared/core-utils' @@ -171,6 +170,7 @@ describe('Test user notifications API validators', function () { abuseNewMessage: UserNotificationSettingValue.WEB, abuseStateChange: UserNotificationSettingValue.WEB, newPeerTubeVersion: UserNotificationSettingValue.WEB, + myVideoStudioEditionFinished: UserNotificationSettingValue.WEB, newPluginVersion: UserNotificationSettingValue.WEB } @@ -233,7 +233,7 @@ describe('Test user notifications API validators', function () { describe('When connecting to my notification socket', function () { it('Should fail with no token', function (next) { - const socket = io(`http://localhost:${server.port}/user-notifications`, { reconnection: false }) + const socket = io(`${server.url}/user-notifications`, { reconnection: false }) socket.once('connect_error', function () { socket.disconnect() @@ -247,7 +247,7 @@ describe('Test user notifications API validators', function () { }) it('Should fail with an invalid token', function (next) { - const socket = io(`http://localhost:${server.port}/user-notifications`, { + const socket = io(`${server.url}/user-notifications`, { query: { accessToken: 'bad_access_token' }, reconnection: false }) @@ -264,7 +264,7 @@ describe('Test user notifications API validators', function () { }) it('Should success with the correct token', function (next) { - const socket = io(`http://localhost:${server.port}/user-notifications`, { + const socket = io(`${server.url}/user-notifications`, { query: { accessToken: server.accessToken }, reconnection: false })