diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-12-07 14:32:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-07 14:32:36 +0100 |
commit | 2d53be0267acc49cda46707b885096193a1f4e9c (patch) | |
tree | 887061a34bc67f40acbb96a6278f9544bf83caeb /shared/extra-utils/miscs | |
parent | adc1f09c0dbd997f34028c1c82d1c118dc8ead80 (diff) | |
download | PeerTube-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.ts | 3 |
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' | |||
6 | import { basename, dirname, isAbsolute, join, resolve } from 'path' | 6 | import { basename, dirname, isAbsolute, join, resolve } from 'path' |
7 | import * as request from 'supertest' | 7 | import * as request from 'supertest' |
8 | import * as WebTorrent from 'webtorrent' | 8 | import * as WebTorrent from 'webtorrent' |
9 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | ||
9 | 10 | ||
10 | const expect = chai.expect | 11 | const expect = chai.expect |
11 | let webtorrent: WebTorrent.Instance | 12 | let webtorrent: WebTorrent.Instance |
@@ -51,7 +52,7 @@ function buildServerDirectory (server: { internalServerNumber: number }, directo | |||
51 | async function testImage (url: string, imageName: string, imagePath: string, extension = '.jpg') { | 52 | async 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 | ||