1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Add plugin API tests

This commit is contained in:
Chocobozzz 2019-07-19 14:36:04 +02:00 committed by Chocobozzz
parent 9b474844e8
commit 09071200c7
19 changed files with 481 additions and 79 deletions

View file

@ -13,7 +13,9 @@ async function installNpmPlugin (npmName: string, version?: string) {
let toInstall = npmName
if (version) toInstall += `@${version}`
await execYarn('add ' + toInstall)
const { stdout } = await execYarn('add ' + toInstall)
logger.debug('Added a yarn package.', { yarnStdout: stdout })
}
async function installNpmPluginFromDisk (path: string) {
@ -46,7 +48,7 @@ async function execYarn (command: string) {
await outputJSON(pluginPackageJSON, {})
}
await execShell(`yarn ${command}`, { cwd: pluginDirectory })
return execShell(`yarn ${command}`, { cwd: pluginDirectory })
} catch (result) {
logger.error('Cannot exec yarn.', { command, err: result.err, stderr: result.stderr })