X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fnotifications%2Fnotifications-api.ts;h=1fc86116047eabdad1606a9912886e2bbd9743b7;hb=82e3ae1523ca6b9013010d9f588213ce4e160403;hp=78864c8a04f8f9782e67c80798e14fcc63825ba3;hpb=ab4b8974997777373a6032073f9c1aaf33ba9931;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/notifications/notifications-api.ts b/server/tests/api/notifications/notifications-api.ts index 78864c8a0..1fc861160 100644 --- a/server/tests/api/notifications/notifications-api.ts +++ b/server/tests/api/notifications/notifications-api.ts @@ -1,7 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' -import * as chai from 'chai' +import { expect } from 'chai' import { CheckerBaseParams, checkNewVideoFromSubscription, @@ -12,8 +11,6 @@ import { import { UserNotification, UserNotificationSettingValue } from '@shared/models' import { cleanupTests, PeerTubeServer, waitJobs } from '@shared/server-commands' -const expect = chai.expect - describe('Test notifications API', function () { let server: PeerTubeServer let userNotifications: UserNotification[] = [] @@ -29,7 +26,7 @@ describe('Test notifications API', function () { userNotifications = res.userNotifications server = res.servers[0] - await server.subscriptions.add({ token: userToken, targetUri: 'root_channel@localhost:' + server.port }) + await server.subscriptions.add({ token: userToken, targetUri: 'root_channel@' + server.host }) for (let i = 0; i < 10; i++) { await server.videos.randomUpload({ wait: false }) @@ -99,7 +96,7 @@ describe('Test notifications API', function () { before(() => { baseParams = { - server: server, + server, emails, socketNotifications: userNotifications, token: userToken