diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-17 11:58:15 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-17 12:24:03 +0100 |
commit | c55e3d7227fe1453869e309025996b9d75256d5d (patch) | |
tree | 08e9b0ca210d75c82c8606fef0852eca020e8e0e /server/tests/shared/plugins.ts | |
parent | bf54587a3e2ad9c2c186828f2a5682b91ee2cc00 (diff) | |
download | PeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.tar.gz PeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.tar.zst PeerTube-c55e3d7227fe1453869e309025996b9d75256d5d.zip |
Move test functions outside extra-utils
Diffstat (limited to 'server/tests/shared/plugins.ts')
-rw-r--r-- | server/tests/shared/plugins.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/server/tests/shared/plugins.ts b/server/tests/shared/plugins.ts new file mode 100644 index 000000000..036fce2ff --- /dev/null +++ b/server/tests/shared/plugins.ts | |||
@@ -0,0 +1,18 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | ||
2 | |||
3 | import { expect } from 'chai' | ||
4 | import { PeerTubeServer } from '@shared/server-commands' | ||
5 | |||
6 | async function testHelloWorldRegisteredSettings (server: PeerTubeServer) { | ||
7 | const body = await server.plugins.getRegisteredSettings({ npmName: 'peertube-plugin-hello-world' }) | ||
8 | |||
9 | const registeredSettings = body.registeredSettings | ||
10 | expect(registeredSettings).to.have.length.at.least(1) | ||
11 | |||
12 | const adminNameSettings = registeredSettings.find(s => s.name === 'admin-name') | ||
13 | expect(adminNameSettings).to.not.be.undefined | ||
14 | } | ||
15 | |||
16 | export { | ||
17 | testHelloWorldRegisteredSettings | ||
18 | } | ||