aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-06 10:36:54 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:17 +0200
commit8ef9457fdee7812b1a8cc3b3bdeff94130819003 (patch)
treef95a5565332a095e17014f211386853a86c9dee1
parentc8fc9b47188b33cfc33184b1ee7e680a093244f1 (diff)
downloadPeerTube-8ef9457fdee7812b1a8cc3b3bdeff94130819003.tar.gz
PeerTube-8ef9457fdee7812b1a8cc3b3bdeff94130819003.tar.zst
PeerTube-8ef9457fdee7812b1a8cc3b3bdeff94130819003.zip
Correctly export misc files
-rw-r--r--server/tests/api/check-params/contact-form.ts5
-rw-r--r--server/tests/api/check-params/users.ts2
-rw-r--r--server/tests/api/notifications/admin-notifications.ts2
-rw-r--r--server/tests/api/notifications/moderation-notifications.ts2
-rw-r--r--server/tests/api/notifications/notifications-api.ts2
-rw-r--r--server/tests/api/notifications/user-notifications.ts2
-rw-r--r--server/tests/api/server/contact-form.ts8
-rw-r--r--server/tests/api/server/email.ts4
-rw-r--r--server/tests/api/users/users-verification.ts8
-rw-r--r--shared/extra-utils/index.ts11
-rw-r--r--shared/extra-utils/miscs/index.ts3
-rw-r--r--shared/extra-utils/mock-servers/index.ts1
-rw-r--r--shared/extra-utils/mock-servers/mock-email.ts (renamed from shared/extra-utils/miscs/email.ts)0
-rw-r--r--shared/extra-utils/users/user-notifications.ts2
14 files changed, 23 insertions, 29 deletions
diff --git a/server/tests/api/check-params/contact-form.ts b/server/tests/api/check-params/contact-form.ts
index c7f9c1b47..274562cbb 100644
--- a/server/tests/api/check-params/contact-form.ts
+++ b/server/tests/api/check-params/contact-form.ts
@@ -1,11 +1,10 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import 'mocha' 3import 'mocha'
4 4import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
5import { cleanupTests, flushAndRunServer, immutableAssign, killallServers, reRunServer, ServerInfo } from '../../../../shared/extra-utils' 5import { cleanupTests, flushAndRunServer, immutableAssign, killallServers, reRunServer, ServerInfo } from '../../../../shared/extra-utils'
6import { MockSmtpServer } from '../../../../shared/extra-utils/mock-servers/mock-email'
6import { sendContactForm } from '../../../../shared/extra-utils/server/contact-form' 7import { sendContactForm } from '../../../../shared/extra-utils/server/contact-form'
7import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email'
8import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
9 8
10describe('Test contact form API validators', function () { 9describe('Test contact form API validators', function () {
11 let server: ServerInfo 10 let server: ServerInfo
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts
index 70a872ce5..da0f55bf8 100644
--- a/server/tests/api/check-params/users.ts
+++ b/server/tests/api/check-params/users.ts
@@ -32,7 +32,7 @@ import {
32 uploadVideo, 32 uploadVideo,
33 userLogin 33 userLogin
34} from '../../../../shared/extra-utils' 34} from '../../../../shared/extra-utils'
35import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email' 35import { MockSmtpServer } from '../../../../shared/extra-utils/mock-servers/mock-email'
36import { 36import {
37 checkBadCountPagination, 37 checkBadCountPagination,
38 checkBadSortPagination, 38 checkBadSortPagination,
diff --git a/server/tests/api/notifications/admin-notifications.ts b/server/tests/api/notifications/admin-notifications.ts
index 170aa4532..91681c9d6 100644
--- a/server/tests/api/notifications/admin-notifications.ts
+++ b/server/tests/api/notifications/admin-notifications.ts
@@ -6,7 +6,7 @@ import { MockJoinPeerTubeVersions } from '@shared/extra-utils'
6import { PluginType } from '@shared/models' 6import { PluginType } from '@shared/models'
7import { cleanupTests, installPlugin, setPluginLatestVersion, setPluginVersion, wait } from '../../../../shared/extra-utils' 7import { cleanupTests, installPlugin, setPluginLatestVersion, setPluginVersion, wait } from '../../../../shared/extra-utils'
8import { ServerInfo } from '../../../../shared/extra-utils/index' 8import { ServerInfo } from '../../../../shared/extra-utils/index'
9import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email' 9import { MockSmtpServer } from '../../../../shared/extra-utils/mock-servers/mock-email'
10import { 10import {
11 CheckerBaseParams, 11 CheckerBaseParams,
12 checkNewPeerTubeVersion, 12 checkNewPeerTubeVersion,
diff --git a/server/tests/api/notifications/moderation-notifications.ts b/server/tests/api/notifications/moderation-notifications.ts
index 3425480ae..a7671696f 100644
--- a/server/tests/api/notifications/moderation-notifications.ts
+++ b/server/tests/api/notifications/moderation-notifications.ts
@@ -27,7 +27,7 @@ import {
27 wait 27 wait
28} from '../../../../shared/extra-utils' 28} from '../../../../shared/extra-utils'
29import { ServerInfo, uploadVideo } from '../../../../shared/extra-utils/index' 29import { ServerInfo, uploadVideo } from '../../../../shared/extra-utils/index'
30import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email' 30import { MockSmtpServer } from '../../../../shared/extra-utils/mock-servers/mock-email'
31import { waitJobs } from '../../../../shared/extra-utils/server/jobs' 31import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
32import { 32import {
33 checkAbuseStateChange, 33 checkAbuseStateChange,
diff --git a/server/tests/api/notifications/notifications-api.ts b/server/tests/api/notifications/notifications-api.ts
index b81995449..19f9dbbab 100644
--- a/server/tests/api/notifications/notifications-api.ts
+++ b/server/tests/api/notifications/notifications-api.ts
@@ -5,7 +5,7 @@ import * as chai from 'chai'
5import { addUserSubscription } from '@shared/extra-utils/users/user-subscriptions' 5import { addUserSubscription } from '@shared/extra-utils/users/user-subscriptions'
6import { cleanupTests, getMyUserInformation, immutableAssign, uploadRandomVideo, waitJobs } from '../../../../shared/extra-utils' 6import { cleanupTests, getMyUserInformation, immutableAssign, uploadRandomVideo, waitJobs } from '../../../../shared/extra-utils'
7import { ServerInfo } from '../../../../shared/extra-utils/index' 7import { ServerInfo } from '../../../../shared/extra-utils/index'
8import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email' 8import { MockSmtpServer } from '../../../../shared/extra-utils/mock-servers/mock-email'
9import { 9import {
10 CheckerBaseParams, 10 CheckerBaseParams,
11 checkNewVideoFromSubscription, 11 checkNewVideoFromSubscription,
diff --git a/server/tests/api/notifications/user-notifications.ts b/server/tests/api/notifications/user-notifications.ts
index e981c1718..ace7e48c7 100644
--- a/server/tests/api/notifications/user-notifications.ts
+++ b/server/tests/api/notifications/user-notifications.ts
@@ -12,7 +12,7 @@ import {
12 wait 12 wait
13} from '../../../../shared/extra-utils' 13} from '../../../../shared/extra-utils'
14import { ServerInfo } from '../../../../shared/extra-utils/index' 14import { ServerInfo } from '../../../../shared/extra-utils/index'
15import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email' 15import { MockSmtpServer } from '../../../../shared/extra-utils/mock-servers/mock-email'
16import { waitJobs } from '../../../../shared/extra-utils/server/jobs' 16import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
17import { 17import {
18 CheckerBaseParams, 18 CheckerBaseParams,
diff --git a/server/tests/api/server/contact-form.ts b/server/tests/api/server/contact-form.ts
index 8851ad55e..71205723d 100644
--- a/server/tests/api/server/contact-form.ts
+++ b/server/tests/api/server/contact-form.ts
@@ -1,12 +1,12 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import * as chai from 'chai'
4import 'mocha' 3import 'mocha'
4import * as chai from 'chai'
5import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
5import { cleanupTests, flushAndRunServer, ServerInfo, setAccessTokensToServers, wait } from '../../../../shared/extra-utils' 6import { cleanupTests, flushAndRunServer, ServerInfo, setAccessTokensToServers, wait } from '../../../../shared/extra-utils'
6import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email' 7import { MockSmtpServer } from '../../../../shared/extra-utils/mock-servers/mock-email'
7import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
8import { sendContactForm } from '../../../../shared/extra-utils/server/contact-form' 8import { sendContactForm } from '../../../../shared/extra-utils/server/contact-form'
9import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' 9import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
10 10
11const expect = chai.expect 11const expect = chai.expect
12 12
diff --git a/server/tests/api/server/email.ts b/server/tests/api/server/email.ts
index 92768d9df..41071692a 100644
--- a/server/tests/api/server/email.ts
+++ b/server/tests/api/server/email.ts
@@ -2,6 +2,7 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
5import { 6import {
6 addVideoToBlacklist, 7 addVideoToBlacklist,
7 askResetPassword, 8 askResetPassword,
@@ -20,9 +21,8 @@ import {
20 userLogin, 21 userLogin,
21 verifyEmail 22 verifyEmail
22} from '../../../../shared/extra-utils' 23} from '../../../../shared/extra-utils'
23import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email' 24import { MockSmtpServer } from '../../../../shared/extra-utils/mock-servers/mock-email'
24import { waitJobs } from '../../../../shared/extra-utils/server/jobs' 25import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
25import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
26 26
27const expect = chai.expect 27const expect = chai.expect
28 28
diff --git a/server/tests/api/users/users-verification.ts b/server/tests/api/users/users-verification.ts
index e0f2f2112..265cd6050 100644
--- a/server/tests/api/users/users-verification.ts
+++ b/server/tests/api/users/users-verification.ts
@@ -1,7 +1,8 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import * as chai from 'chai'
4import 'mocha' 3import 'mocha'
4import * as chai from 'chai'
5import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
5import { 6import {
6 cleanupTests, 7 cleanupTests,
7 flushAndRunServer, 8 flushAndRunServer,
@@ -15,11 +16,10 @@ import {
15 userLogin, 16 userLogin,
16 verifyEmail 17 verifyEmail
17} from '../../../../shared/extra-utils' 18} from '../../../../shared/extra-utils'
18import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login' 19import { MockSmtpServer } from '../../../../shared/extra-utils/mock-servers/mock-email'
19import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email'
20import { waitJobs } from '../../../../shared/extra-utils/server/jobs' 20import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
21import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login'
21import { User } from '../../../../shared/models/users' 22import { User } from '../../../../shared/models/users'
22import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
23 23
24const expect = chai.expect 24const expect = chai.expect
25 25
diff --git a/shared/extra-utils/index.ts b/shared/extra-utils/index.ts
index 30f44dfc2..7d2887209 100644
--- a/shared/extra-utils/index.ts
+++ b/shared/extra-utils/index.ts
@@ -1,20 +1,11 @@
1export * from './bulk' 1export * from './bulk'
2
3export * from './cli' 2export * from './cli'
4
5export * from './custom-pages' 3export * from './custom-pages'
6
7export * from './feeds' 4export * from './feeds'
8
9export * from './logs' 5export * from './logs'
10 6export * from './miscs'
11export * from './mock-servers' 7export * from './mock-servers'
12 8
13export * from './miscs/email'
14export * from './miscs/sql'
15export * from './miscs/miscs'
16export * from './miscs/stubs'
17
18export * from './moderation/abuses' 9export * from './moderation/abuses'
19export * from './plugins/mock-blocklist' 10export * from './plugins/mock-blocklist'
20 11
diff --git a/shared/extra-utils/miscs/index.ts b/shared/extra-utils/miscs/index.ts
new file mode 100644
index 000000000..ccacd4c79
--- /dev/null
+++ b/shared/extra-utils/miscs/index.ts
@@ -0,0 +1,3 @@
1export * from './miscs'
2export * from './sql'
3export * from './stubs'
diff --git a/shared/extra-utils/mock-servers/index.ts b/shared/extra-utils/mock-servers/index.ts
index 47679c818..485757843 100644
--- a/shared/extra-utils/mock-servers/index.ts
+++ b/shared/extra-utils/mock-servers/index.ts
@@ -1,2 +1,3 @@
1export * from './mock-email'
1export * from './mock-instances-index' 2export * from './mock-instances-index'
2export * from './mock-joinpeertube-versions' 3export * from './mock-joinpeertube-versions'
diff --git a/shared/extra-utils/miscs/email.ts b/shared/extra-utils/mock-servers/mock-email.ts
index 9fc9a5ad0..9fc9a5ad0 100644
--- a/shared/extra-utils/miscs/email.ts
+++ b/shared/extra-utils/mock-servers/mock-email.ts
diff --git a/shared/extra-utils/users/user-notifications.ts b/shared/extra-utils/users/user-notifications.ts
index 844f4442d..e75946eec 100644
--- a/shared/extra-utils/users/user-notifications.ts
+++ b/shared/extra-utils/users/user-notifications.ts
@@ -5,7 +5,7 @@ import { inspect } from 'util'
5import { AbuseState, PluginType } from '@shared/models' 5import { AbuseState, PluginType } from '@shared/models'
6import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' 6import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
7import { UserNotification, UserNotificationSetting, UserNotificationSettingValue, UserNotificationType } from '../../models/users' 7import { UserNotification, UserNotificationSetting, UserNotificationSettingValue, UserNotificationType } from '../../models/users'
8import { MockSmtpServer } from '../miscs/email' 8import { MockSmtpServer } from '../mock-servers/mock-email'
9import { makeGetRequest, makePostBodyRequest, makePutBodyRequest } from '../requests/requests' 9import { makeGetRequest, makePostBodyRequest, makePutBodyRequest } from '../requests/requests'
10import { doubleFollow } from '../server/follows' 10import { doubleFollow } from '../server/follows'
11import { flushAndRunMultipleServers, ServerInfo } from '../server/servers' 11import { flushAndRunMultipleServers, ServerInfo } from '../server/servers'