aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/miscs
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-12-07 14:32:36 +0100
committerGitHub <noreply@github.com>2020-12-07 14:32:36 +0100
commit2d53be0267acc49cda46707b885096193a1f4e9c (patch)
tree887061a34bc67f40acbb96a6278f9544bf83caeb /shared/extra-utils/miscs
parentadc1f09c0dbd997f34028c1c82d1c118dc8ead80 (diff)
downloadPeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.tar.gz
PeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.tar.zst
PeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.zip
replace numbers with typed http status codes (#3409)
Diffstat (limited to 'shared/extra-utils/miscs')
-rw-r--r--shared/extra-utils/miscs/miscs.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/shared/extra-utils/miscs/miscs.ts b/shared/extra-utils/miscs/miscs.ts
index aea9563cf..764b74bda 100644
--- a/shared/extra-utils/miscs/miscs.ts
+++ b/shared/extra-utils/miscs/miscs.ts
@@ -6,6 +6,7 @@ import { ensureDir, pathExists, readFile, stat } from 'fs-extra'
6import { basename, dirname, isAbsolute, join, resolve } from 'path' 6import { basename, dirname, isAbsolute, join, resolve } from 'path'
7import * as request from 'supertest' 7import * as request from 'supertest'
8import * as WebTorrent from 'webtorrent' 8import * as WebTorrent from 'webtorrent'
9import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
9 10
10const expect = chai.expect 11const expect = chai.expect
11let webtorrent: WebTorrent.Instance 12let webtorrent: WebTorrent.Instance
@@ -51,7 +52,7 @@ function buildServerDirectory (server: { internalServerNumber: number }, directo
51async function testImage (url: string, imageName: string, imagePath: string, extension = '.jpg') { 52async function testImage (url: string, imageName: string, imagePath: string, extension = '.jpg') {
52 const res = await request(url) 53 const res = await request(url)
53 .get(imagePath) 54 .get(imagePath)
54 .expect(200) 55 .expect(HttpStatusCode.OK_200)
55 56
56 const body = res.body 57 const body = res.body
57 58