PeerTube/shared/extra-utils/server/plugins.ts

19 lines
637 B
TypeScript
Raw Normal View History

/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
import { expect } from 'chai'
2021-07-07 10:33:49 +02:00
import { ServerInfo } from '../server/servers'
async function testHelloWorldRegisteredSettings (server: ServerInfo) {
2021-07-16 09:04:35 +02:00
const body = await server.plugins.getRegisteredSettings({ npmName: 'peertube-plugin-hello-world' })
2021-07-07 10:33:49 +02:00
const registeredSettings = body.registeredSettings
expect(registeredSettings).to.have.length.at.least(1)
const adminNameSettings = registeredSettings.find(s => s.name === 'admin-name')
expect(adminNameSettings).to.not.be.undefined
}
export {
2021-07-07 10:33:49 +02:00
testHelloWorldRegisteredSettings
}