X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fserver%2Fauto-follows.ts;h=6ce1a3799bcf6b6e80e850214aca1f05192c6032;hb=d1c64fd970fc236b9ba01ac944659051e9e04a99;hp=6d2333a6bc582db202fc787fd396eb6d84bb0c0f;hpb=c3edc5b074aa4bb1861ed0a94d3713808e87170f;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/server/auto-follows.ts b/server/tests/api/server/auto-follows.ts index 6d2333a6b..6ce1a3799 100644 --- a/server/tests/api/server/auto-follows.ts +++ b/server/tests/api/server/auto-follows.ts @@ -1,13 +1,10 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' -import * as chai from 'chai' +import { expect } from 'chai' import { MockInstancesIndex } from '@server/tests/shared' import { wait } from '@shared/core-utils' import { cleanupTests, createMultipleServers, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/server-commands' -const expect = chai.expect - async function checkFollow (follower: PeerTubeServer, following: PeerTubeServer, exists: boolean) { { const body = await following.follows.getFollowers({ start: 0, count: 5, sort: '-createdAt' }) @@ -49,7 +46,7 @@ describe('Test auto follows', function () { let servers: PeerTubeServer[] = [] before(async function () { - this.timeout(30000) + this.timeout(120000) servers = await createMultipleServers(3) @@ -130,7 +127,7 @@ describe('Test auto follows', function () { const instanceIndexServer = new MockInstancesIndex() let port: number - before(async () => { + before(async function () { port = await instanceIndexServer.initialize() }) @@ -153,7 +150,7 @@ describe('Test auto follows', function () { followings: { instance: { autoFollowIndex: { - indexUrl: `http://localhost:${port}/api/v1/instances/hosts`, + indexUrl: `http://127.0.0.1:${port}/api/v1/instances/hosts`, enabled: true } }