aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/mock-servers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-27 14:32:44 +0200
committerChocobozzz <me@florianbigard.com>2021-08-27 15:12:22 +0200
commit41fb13c330de629df2d23379209e79c7af0f2e9a (patch)
tree73bc5a90566406b3910f142beae2a879c1e4265d /shared/extra-utils/mock-servers
parent40e7ed0714f96c01e16de3ac971a4b28116294e1 (diff)
downloadPeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.tar.gz
PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.tar.zst
PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.zip
esModuleInterop to true
Diffstat (limited to 'shared/extra-utils/mock-servers')
-rw-r--r--shared/extra-utils/mock-servers/mock-email.ts3
-rw-r--r--shared/extra-utils/mock-servers/mock-instances-index.ts2
-rw-r--r--shared/extra-utils/mock-servers/mock-joinpeertube-versions.ts2
-rw-r--r--shared/extra-utils/mock-servers/mock-object-storage.ts2
-rw-r--r--shared/extra-utils/mock-servers/mock-plugin-blocklist.ts4
-rw-r--r--shared/extra-utils/mock-servers/mock-proxy.ts2
6 files changed, 7 insertions, 8 deletions
diff --git a/shared/extra-utils/mock-servers/mock-email.ts b/shared/extra-utils/mock-servers/mock-email.ts
index ffd62e325..c13d3dc0f 100644
--- a/shared/extra-utils/mock-servers/mock-email.ts
+++ b/shared/extra-utils/mock-servers/mock-email.ts
@@ -1,9 +1,8 @@
1import { ChildProcess } from 'child_process' 1import { ChildProcess } from 'child_process'
2import MailDev from 'maildev'
2import { randomInt } from '@shared/core-utils' 3import { randomInt } from '@shared/core-utils'
3import { parallelTests } from '../miscs' 4import { parallelTests } from '../miscs'
4 5
5const MailDev = require('maildev')
6
7class MockSmtpServer { 6class MockSmtpServer {
8 7
9 private static instance: MockSmtpServer 8 private static instance: MockSmtpServer
diff --git a/shared/extra-utils/mock-servers/mock-instances-index.ts b/shared/extra-utils/mock-servers/mock-instances-index.ts
index c9e33087d..2aabef9d2 100644
--- a/shared/extra-utils/mock-servers/mock-instances-index.ts
+++ b/shared/extra-utils/mock-servers/mock-instances-index.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { randomInt } from '@shared/core-utils' 2import { randomInt } from '@shared/core-utils'
3 3
4export class MockInstancesIndex { 4export class MockInstancesIndex {
diff --git a/shared/extra-utils/mock-servers/mock-joinpeertube-versions.ts b/shared/extra-utils/mock-servers/mock-joinpeertube-versions.ts
index 5ea432ecf..5106fc66a 100644
--- a/shared/extra-utils/mock-servers/mock-joinpeertube-versions.ts
+++ b/shared/extra-utils/mock-servers/mock-joinpeertube-versions.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import { randomInt } from '@shared/core-utils' 2import { randomInt } from '@shared/core-utils'
3 3
4export class MockJoinPeerTubeVersions { 4export class MockJoinPeerTubeVersions {
diff --git a/shared/extra-utils/mock-servers/mock-object-storage.ts b/shared/extra-utils/mock-servers/mock-object-storage.ts
index 19ea7c87c..f1c5a6123 100644
--- a/shared/extra-utils/mock-servers/mock-object-storage.ts
+++ b/shared/extra-utils/mock-servers/mock-object-storage.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express from 'express'
2import got, { RequestError } from 'got' 2import got, { RequestError } from 'got'
3import { Server } from 'http' 3import { Server } from 'http'
4import { pipeline } from 'stream' 4import { pipeline } from 'stream'
diff --git a/shared/extra-utils/mock-servers/mock-plugin-blocklist.ts b/shared/extra-utils/mock-servers/mock-plugin-blocklist.ts
index d18f8224f..6f66bf4f0 100644
--- a/shared/extra-utils/mock-servers/mock-plugin-blocklist.ts
+++ b/shared/extra-utils/mock-servers/mock-plugin-blocklist.ts
@@ -1,4 +1,4 @@
1import * as express from 'express' 1import express, { Request, Response } from 'express'
2import { Server } from 'http' 2import { Server } from 'http'
3import { randomInt } from '@shared/core-utils' 3import { randomInt } from '@shared/core-utils'
4 4
@@ -18,7 +18,7 @@ export class MockBlocklist {
18 return new Promise<number>(res => { 18 return new Promise<number>(res => {
19 const app = express() 19 const app = express()
20 20
21 app.get('/blocklist', (req: express.Request, res: express.Response) => { 21 app.get('/blocklist', (req: Request, res: Response) => {
22 return res.json(this.body) 22 return res.json(this.body)
23 }) 23 })
24 24
diff --git a/shared/extra-utils/mock-servers/mock-proxy.ts b/shared/extra-utils/mock-servers/mock-proxy.ts
index 5365f87d1..eb5f177c7 100644
--- a/shared/extra-utils/mock-servers/mock-proxy.ts
+++ b/shared/extra-utils/mock-servers/mock-proxy.ts
@@ -1,6 +1,6 @@
1 1
2import { createServer, Server } from 'http' 2import { createServer, Server } from 'http'
3import * as proxy from 'proxy' 3import proxy from 'proxy'
4import { randomInt } from '@shared/core-utils' 4import { randomInt } from '@shared/core-utils'
5 5
6class MockProxy { 6class MockProxy {