diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-09 14:05:21 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-09 14:09:24 +0100 |
commit | 650580504cf14a87bd4025eec9673eb5642dc71d (patch) | |
tree | ae5dce55a9cbe8c392db4668bb599c74a17b241d /server/tests/plugins/filter-hooks.ts | |
parent | a554bc1a260a525cd635d62404b9fe76fdb9e36b (diff) | |
download | PeerTube-650580504cf14a87bd4025eec9673eb5642dc71d.tar.gz PeerTube-650580504cf14a87bd4025eec9673eb5642dc71d.tar.zst PeerTube-650580504cf14a87bd4025eec9673eb5642dc71d.zip |
Add filter:api.server.stats.get.result hook
Diffstat (limited to 'server/tests/plugins/filter-hooks.ts')
-rw-r--r-- | server/tests/plugins/filter-hooks.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/server/tests/plugins/filter-hooks.ts b/server/tests/plugins/filter-hooks.ts index 02915f08c..80014566b 100644 --- a/server/tests/plugins/filter-hooks.ts +++ b/server/tests/plugins/filter-hooks.ts | |||
@@ -537,6 +537,16 @@ describe('Test plugin filter hooks', function () { | |||
537 | }) | 537 | }) |
538 | }) | 538 | }) |
539 | 539 | ||
540 | describe('Stats filters', function () { | ||
541 | |||
542 | it('Should run filter:api.server.stats.get.result', async function () { | ||
543 | const data = await servers[0].stats.get() | ||
544 | |||
545 | expect((data as any).customStats).to.equal(14) | ||
546 | }) | ||
547 | |||
548 | }) | ||
549 | |||
540 | after(async function () { | 550 | after(async function () { |
541 | await cleanupTests(servers) | 551 | await cleanupTests(servers) |
542 | }) | 552 | }) |