diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-27 14:32:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-27 15:12:22 +0200 |
commit | 41fb13c330de629df2d23379209e79c7af0f2e9a (patch) | |
tree | 73bc5a90566406b3910f142beae2a879c1e4265d /shared/extra-utils/mock-servers | |
parent | 40e7ed0714f96c01e16de3ac971a4b28116294e1 (diff) | |
download | PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.tar.gz PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.tar.zst PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.zip |
esModuleInterop to true
Diffstat (limited to 'shared/extra-utils/mock-servers')
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 @@ | |||
1 | import { ChildProcess } from 'child_process' | 1 | import { ChildProcess } from 'child_process' |
2 | import MailDev from 'maildev' | ||
2 | import { randomInt } from '@shared/core-utils' | 3 | import { randomInt } from '@shared/core-utils' |
3 | import { parallelTests } from '../miscs' | 4 | import { parallelTests } from '../miscs' |
4 | 5 | ||
5 | const MailDev = require('maildev') | ||
6 | |||
7 | class MockSmtpServer { | 6 | class 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { randomInt } from '@shared/core-utils' | 2 | import { randomInt } from '@shared/core-utils' |
3 | 3 | ||
4 | export class MockInstancesIndex { | 4 | export 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import { randomInt } from '@shared/core-utils' | 2 | import { randomInt } from '@shared/core-utils' |
3 | 3 | ||
4 | export class MockJoinPeerTubeVersions { | 4 | export 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 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import got, { RequestError } from 'got' | 2 | import got, { RequestError } from 'got' |
3 | import { Server } from 'http' | 3 | import { Server } from 'http' |
4 | import { pipeline } from 'stream' | 4 | import { 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 @@ | |||
1 | import * as express from 'express' | 1 | import express, { Request, Response } from 'express' |
2 | import { Server } from 'http' | 2 | import { Server } from 'http' |
3 | import { randomInt } from '@shared/core-utils' | 3 | import { 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 | ||
2 | import { createServer, Server } from 'http' | 2 | import { createServer, Server } from 'http' |
3 | import * as proxy from 'proxy' | 3 | import proxy from 'proxy' |
4 | import { randomInt } from '@shared/core-utils' | 4 | import { randomInt } from '@shared/core-utils' |
5 | 5 | ||
6 | class MockProxy { | 6 | class MockProxy { |