1 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
5 import { cleanupTests, flushAndRunServer, ServerInfo } from '../../../../shared/extra-utils'
6 import { getActor } from '../../../../shared/extra-utils/actors/actors'
7 import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
9 describe('Test actors API validators', function () {
10 let server: ServerInfo
12 // ---------------------------------------------------------------
14 before(async function () {
17 server = await flushAndRunServer(1)
20 describe('When getting an actor', function () {
21 it('Should return 404 with a non existing actorName', async function () {
22 await getActor(server.url, 'arfaze', HttpStatusCode.NOT_FOUND_404)
25 it('Should return 200 with an existing accountName', async function () {
26 await getActor(server.url, 'root', HttpStatusCode.OK_200)
29 it('Should return 200 with an existing channelName', async function () {
30 await getActor(server.url, 'root_channel', HttpStatusCode.OK_200)
34 after(async function () {
35 await cleanupTests([ server ])