]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/server/stats.ts
Merge remote-tracking branch 'weblate/develop' into develop
[github/Chocobozzz/PeerTube.git] / server / tests / api / server / stats.ts
index bc35cbe4e87040e0042d9c0c242b3cdee2da8ca9..942cbeaa43accd807cab2f1c6e8ac17e17aa40a9 100644 (file)
@@ -1,7 +1,6 @@
 /* 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 {
@@ -15,8 +14,6 @@ import {
   waitJobs
 } from '@shared/server-commands'
 
-const expect = chai.expect
-
 describe('Test stats (excluding redundancy)', function () {
   let servers: PeerTubeServer[] = []
   let channelId
@@ -134,6 +131,7 @@ describe('Test stats (excluding redundancy)', function () {
     {
       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)
@@ -149,6 +147,7 @@ describe('Test stats (excluding redundancy)', function () {
 
       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)
@@ -159,6 +158,7 @@ describe('Test stats (excluding redundancy)', function () {
 
       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)
@@ -188,7 +188,7 @@ describe('Test stats (excluding redundancy)', function () {
   })
 
   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: {