]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/cli/print-transcode-command.ts
Merge branch 'release/3.3.0' into develop
[github/Chocobozzz/PeerTube.git] / server / tests / cli / print-transcode-command.ts
index 2d7255db7a281cc4b47ca58cae029d91e96bd224..3a7969e681884e4ef8cd7ae018b16495797c48c1 100644 (file)
@@ -2,14 +2,15 @@
 
 import 'mocha'
 import * as chai from 'chai'
-import { execCLI } from '../../../shared/extra-utils'
+import { getVideoFileBitrate, getVideoFileFPS } from '@server/helpers/ffprobe-utils'
+import { CLICommand } from '@shared/extra-utils'
 import { getTargetBitrate, VideoResolution } from '../../../shared/models/videos'
 import { VIDEO_TRANSCODING_FPS } from '../../initializers/constants'
-import { getVideoFileBitrate, getVideoFileFPS } from '@server/helpers/ffprobe-utils'
 
 const expect = chai.expect
 
 describe('Test create transcoding jobs', function () {
+
   it('Should print the correct command for each resolution', async function () {
     const fixturePath = 'server/tests/fixtures/video_short.webm'
     const fps = await getVideoFileFPS(fixturePath)
@@ -19,7 +20,7 @@ describe('Test create transcoding jobs', function () {
       VideoResolution.H_720P,
       VideoResolution.H_1080P
     ]) {
-      const command = await execCLI(`npm run print-transcode-command -- ${fixturePath} -r ${resolution}`)
+      const command = await CLICommand.exec(`npm run print-transcode-command -- ${fixturePath} -r ${resolution}`)
       const targetBitrate = Math.min(getTargetBitrate(resolution, fps, VIDEO_TRANSCODING_FPS), bitrate)
 
       expect(command).to.includes(`-vf scale=w=-2:h=${resolution}`)