aboutsummaryrefslogblamecommitdiffhomepage
path: root/packages/tests/src/api/server/no-client.ts
blob: 0f097d50b0dff9a3f98088b678857a704e19461e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                               

                                                                                                     

                                                                         
                            



                            
                                                                                 





                                                    
                                                   

    

                                  

    
import request from 'supertest'
import { HttpStatusCode } from '@peertube/peertube-models'
import { cleanupTests, createSingleServer, PeerTubeServer } from '@peertube/peertube-server-commands'

describe('Start and stop server without web client routes', function () {
  let server: PeerTubeServer

  before(async function () {
    this.timeout(30000)

    server = await createSingleServer(1, {}, { peertubeArgs: [ '--no-client' ] })
  })

  it('Should fail getting the client', function () {
    const req = request(server.url)
      .get('/')

    return req.expect(HttpStatusCode.NOT_FOUND_404)
  })

  after(async function () {
    await cleanupTests([ server ])
  })
})