/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
-import 'mocha'
-import * as chai from 'chai'
+import { expect } from 'chai'
import { wait } from '@shared/core-utils'
import { ActivityType, VideoPlaylistPrivacy } from '@shared/models'
import {
waitJobs
} from '@shared/server-commands'
-const expect = chai.expect
-
describe('Test stats (excluding redundancy)', function () {
let servers: PeerTubeServer[] = []
let channelId
{
const data = await server.stats.get()
+ expect(data.totalLocalVideoChannels).to.equal(2)
expect(data.totalLocalDailyActiveVideoChannels).to.equal(1)
expect(data.totalLocalWeeklyActiveVideoChannels).to.equal(1)
expect(data.totalLocalMonthlyActiveVideoChannels).to.equal(1)
const data = await server.stats.get()
+ expect(data.totalLocalVideoChannels).to.equal(3)
expect(data.totalLocalDailyActiveVideoChannels).to.equal(1)
expect(data.totalLocalWeeklyActiveVideoChannels).to.equal(1)
expect(data.totalLocalMonthlyActiveVideoChannels).to.equal(1)
const data = await server.stats.get()
+ expect(data.totalLocalVideoChannels).to.equal(3)
expect(data.totalLocalDailyActiveVideoChannels).to.equal(2)
expect(data.totalLocalWeeklyActiveVideoChannels).to.equal(2)
expect(data.totalLocalMonthlyActiveVideoChannels).to.equal(2)
})
it('Should correctly count video file sizes if transcoding is enabled', async function () {
- this.timeout(60000)
+ this.timeout(120000)
await servers[0].config.updateCustomSubConfig({
newConfig: {
})
it('Should have the correct AP stats', async function () {
- this.timeout(60000)
+ this.timeout(120000)
await servers[0].config.disableTranscoding()