]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/plugins/filter-hooks.ts
Add filter:api.server.stats.get.result hook
[github/Chocobozzz/PeerTube.git] / server / tests / plugins / filter-hooks.ts
index 02915f08cb2f8199f383cdb778b618544f014c68..80014566bf53883f3e6fa4ae0ea60c05466f2142 100644 (file)
@@ -537,6 +537,16 @@ describe('Test plugin filter hooks', function () {
     })
   })
 
+  describe('Stats filters', function () {
+
+    it('Should run filter:api.server.stats.get.result', async function () {
+      const data = await servers[0].stats.get()
+
+      expect((data as any).customStats).to.equal(14)
+    })
+
+  })
+
   after(async function () {
     await cleanupTests(servers)
   })