X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fserver%2Fauto-follows.ts;h=1519b263fb0eb54dac0c53d3b69b817a83fd800b;hb=693c6586cb896a84ff0f897b1c242bcf7bdcbaee;hp=7efccc3e20d2e274958f8c80b64643cbf6bd5eca;hpb=95cd31f1fe3311c873bee8185e6b07398a775a47;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/server/auto-follows.ts b/server/tests/api/server/auto-follows.ts index 7efccc3e2..1519b263f 100644 --- a/server/tests/api/server/auto-follows.ts +++ b/server/tests/api/server/auto-follows.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import * as chai from 'chai' import 'mocha' +import * as chai from 'chai' import { acceptFollower, cleanupTests, @@ -153,9 +153,10 @@ describe('Test auto follows', function () { describe('Auto follow index', function () { const instanceIndexServer = new MockInstancesIndex() + let port: number before(async () => { - await instanceIndexServer.initialize() + port = await instanceIndexServer.initialize() }) it('Should not auto follow index if the option is not enabled', async function () { @@ -177,7 +178,7 @@ describe('Test auto follows', function () { followings: { instance: { autoFollowIndex: { - indexUrl: 'http://localhost:42100/api/v1/instances/hosts', + indexUrl: `http://localhost:${port}/api/v1/instances/hosts`, enabled: true } }