]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/server/no-client.ts
Stop testing broken youtube-dl
[github/Chocobozzz/PeerTube.git] / server / tests / api / server / no-client.ts
index 86edeb2891c18ad4f1067573d92b78a9b9738854..193f6c9877a2ad112cad483a5c5e7fd124caf139 100644 (file)
@@ -1,22 +1,21 @@
-import 'mocha'
-import * as request from 'supertest'
-import { ServerInfo } from '../../../../shared/extra-utils'
-import { cleanupTests, flushAndRunServer } from '../../../../shared/extra-utils/server/servers'
+import request from 'supertest'
+import { HttpStatusCode } from '@shared/models'
+import { cleanupTests, createSingleServer, PeerTubeServer } from '@shared/server-commands'
 
 describe('Start and stop server without web client routes', function () {
-  let server: ServerInfo
+  let server: PeerTubeServer
 
   before(async function () {
     this.timeout(30000)
 
-    server = await flushAndRunServer(1, {}, ['--no-client'])
+    server = await createSingleServer(1, {}, { peertubeArgs: [ '--no-client' ] })
   })
 
   it('Should fail getting the client', function () {
     const req = request(server.url)
       .get('/')
 
-    return req.expect(404)
+    return req.expect(HttpStatusCode.NOT_FOUND_404)
   })
 
   after(async function () {