From c55e3d7227fe1453869e309025996b9d75256d5d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 17 Dec 2021 11:58:15 +0100 Subject: Move test functions outside extra-utils --- server/tests/plugins/external-auth.ts | 6 +++--- server/tests/plugins/filter-hooks.ts | 4 ++-- server/tests/plugins/html-injection.ts | 2 +- server/tests/plugins/id-and-pass-auth.ts | 3 ++- server/tests/plugins/plugin-helpers.ts | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) (limited to 'server/tests/plugins') diff --git a/server/tests/plugins/external-auth.ts b/server/tests/plugins/external-auth.ts index a4a3764f5..583100671 100644 --- a/server/tests/plugins/external-auth.ts +++ b/server/tests/plugins/external-auth.ts @@ -2,16 +2,16 @@ import 'mocha' import { expect } from 'chai' +import { wait } from '@shared/core-utils' +import { HttpStatusCode, UserRole } from '@shared/models' import { cleanupTests, createSingleServer, decodeQueryString, PeerTubeServer, PluginsCommand, - setAccessTokensToServers, - wait + setAccessTokensToServers } from '@shared/server-commands' -import { HttpStatusCode, UserRole } from '@shared/models' async function loginExternal (options: { server: PeerTubeServer diff --git a/server/tests/plugins/filter-hooks.ts b/server/tests/plugins/filter-hooks.ts index a84edfac6..52ba396e5 100644 --- a/server/tests/plugins/filter-hooks.ts +++ b/server/tests/plugins/filter-hooks.ts @@ -2,11 +2,11 @@ import 'mocha' import * as chai from 'chai' +import { HttpStatusCode, VideoDetails, VideoImportState, VideoPlaylist, VideoPlaylistPrivacy, VideoPrivacy } from '@shared/models' import { cleanupTests, createMultipleServers, doubleFollow, - FIXTURE_URLS, makeRawRequest, PeerTubeServer, PluginsCommand, @@ -14,7 +14,7 @@ import { setDefaultVideoChannel, waitJobs } from '@shared/server-commands' -import { HttpStatusCode, VideoDetails, VideoImportState, VideoPlaylist, VideoPlaylistPrivacy, VideoPrivacy } from '@shared/models' +import { FIXTURE_URLS } from '../shared' const expect = chai.expect diff --git a/server/tests/plugins/html-injection.ts b/server/tests/plugins/html-injection.ts index 9e10d3302..0a3a9c25f 100644 --- a/server/tests/plugins/html-injection.ts +++ b/server/tests/plugins/html-injection.ts @@ -9,7 +9,7 @@ import { PeerTubeServer, PluginsCommand, setAccessTokensToServers -} from '../../../shared/server-commands' +} from '@shared/server-commands' const expect = chai.expect diff --git a/server/tests/plugins/id-and-pass-auth.ts b/server/tests/plugins/id-and-pass-auth.ts index ea3b0f6ab..e72046ce2 100644 --- a/server/tests/plugins/id-and-pass-auth.ts +++ b/server/tests/plugins/id-and-pass-auth.ts @@ -2,8 +2,9 @@ import 'mocha' import { expect } from 'chai' -import { cleanupTests, createSingleServer, PeerTubeServer, PluginsCommand, setAccessTokensToServers, wait } from '@shared/server-commands' +import { wait } from '@shared/core-utils' import { HttpStatusCode, UserRole } from '@shared/models' +import { cleanupTests, createSingleServer, PeerTubeServer, PluginsCommand, setAccessTokensToServers } from '@shared/server-commands' describe('Test id and pass auth plugins', function () { let server: PeerTubeServer diff --git a/server/tests/plugins/plugin-helpers.ts b/server/tests/plugins/plugin-helpers.ts index 4ab4acd58..167429ef4 100644 --- a/server/tests/plugins/plugin-helpers.ts +++ b/server/tests/plugins/plugin-helpers.ts @@ -3,8 +3,8 @@ import 'mocha' import { expect } from 'chai' import { pathExists } from 'fs-extra' +import { HttpStatusCode, ThumbnailType } from '@shared/models' import { - checkVideoFilesWereRemoved, cleanupTests, createMultipleServers, doubleFollow, @@ -16,7 +16,7 @@ import { setAccessTokensToServers, waitJobs } from '@shared/server-commands' -import { HttpStatusCode, ThumbnailType } from '@shared/models' +import { checkVideoFilesWereRemoved } from '../shared' function postCommand (server: PeerTubeServer, command: string, bodyArg?: object) { const body = { command } -- cgit v1.2.3