X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fplugins%2Faction-hooks.ts;h=36f8052c0a1744e7b1f8badb59c500a9ee4b45bb;hb=c2419476302b20e9fe3708d7a0a889ae18c95c1b;hp=209db95a44b835c4bab13ca9fdcf1d0711fabc74;hpb=0260dc8aca952f9412a8620e433b9e16e675696e;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/plugins/action-hooks.ts b/server/tests/plugins/action-hooks.ts index 209db95a4..36f8052c0 100644 --- a/server/tests/plugins/action-hooks.ts +++ b/server/tests/plugins/action-hooks.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { ServerHookName, VideoPlaylistPrivacy, VideoPrivacy } from '@shared/models' import { cleanupTests, @@ -17,12 +16,12 @@ describe('Test plugin action hooks', function () { let videoUUID: string let threadId: number - function checkHook (hook: ServerHookName) { - return servers[0].servers.waitUntilLog('Run hook ' + hook) + function checkHook (hook: ServerHookName, strictCount = true) { + return servers[0].servers.waitUntilLog('Run hook ' + hook, 1, strictCount) } before(async function () { - this.timeout(30000) + this.timeout(120000) servers = await createMultipleServers(2) await setAccessTokensToServers(servers) @@ -225,6 +224,13 @@ describe('Test plugin action hooks', function () { }) }) + describe('Notification hook', function () { + + it('Should run action:notifier.notification.created', async function () { + await checkHook('action:notifier.notification.created', false) + }) + }) + after(async function () { await cleanupTests(servers) })