2024-05-23 09:42:14 +00:00
|
|
|
// SPDX-FileCopyrightText: 2024 John Livingston <https://www.john-livingston.fr/>
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2023-04-13 13:41:46 +00:00
|
|
|
import type { RegisterServerOptions } from '@peertube/peertube-types'
|
|
|
|
import { newResult, TestResult } from './utils'
|
|
|
|
import { isDebugMode } from '../../lib/debug'
|
|
|
|
|
|
|
|
export async function diagDebug (test: string, options: RegisterServerOptions): Promise<TestResult> {
|
|
|
|
const result = newResult(test)
|
|
|
|
result.label = 'Test debug mode'
|
|
|
|
result.ok = true
|
|
|
|
result.messages = [isDebugMode(options) ? 'Debug mode is ON' : 'Debug mode is OFF']
|
|
|
|
result.next = 'webchat-video'
|
|
|
|
return result
|
|
|
|
}
|