WIP on builtin prosody.

This commit is contained in:
John Livingston
2021-04-12 20:52:21 +02:00
parent 79bdaceb48
commit 4690d97384
3 changed files with 136 additions and 7 deletions

View File

@ -1,7 +1,18 @@
import { getWorkingDir } from '../prosody/config'
import { newResult, TestResult } from './utils'
export async function diagProsody (test: string, _options: RegisterServerOptions): Promise<TestResult> {
export async function diagProsody (test: string, options: RegisterServerOptions): Promise<TestResult> {
const result = newResult(test)
result.label = 'Builtin Prosody and ConverseJS'
try {
const dir = await getWorkingDir(options)
result.messages.push('The working dir is: ' + dir)
} catch (error) {
result.messages.push('Error when requiring the working dir: ' + (error as string))
return result
}
result.ok = true
return result
}