From 41fb13c330de629df2d23379209e79c7af0f2e9a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 27 Aug 2021 14:32:44 +0200 Subject: esModuleInterop to true --- shared/extra-utils/videos/captions.ts | 2 +- shared/extra-utils/videos/live.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'shared/extra-utils/videos') diff --git a/shared/extra-utils/videos/captions.ts b/shared/extra-utils/videos/captions.ts index ff8a43366..fc44cd250 100644 --- a/shared/extra-utils/videos/captions.ts +++ b/shared/extra-utils/videos/captions.ts @@ -1,5 +1,5 @@ import { expect } from 'chai' -import * as request from 'supertest' +import request from 'supertest' import { HttpStatusCode } from '@shared/models' async function testCaptionFile (url: string, captionPath: string, containsString: string) { diff --git a/shared/extra-utils/videos/live.ts b/shared/extra-utils/videos/live.ts index 29f99ed6d..d3665bc90 100644 --- a/shared/extra-utils/videos/live.ts +++ b/shared/extra-utils/videos/live.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ import { expect } from 'chai' -import * as ffmpeg from 'fluent-ffmpeg' +import ffmpeg, { FfmpegCommand } from 'fluent-ffmpeg' import { pathExists, readdir } from 'fs-extra' import { join } from 'path' import { buildAbsoluteFixturePath, wait } from '../miscs' @@ -50,7 +50,7 @@ function sendRTMPStream (options: { return command } -function waitFfmpegUntilError (command: ffmpeg.FfmpegCommand, successAfterMS = 10000) { +function waitFfmpegUntilError (command: FfmpegCommand, successAfterMS = 10000) { return new Promise((res, rej) => { command.on('error', err => { return rej(err) @@ -62,7 +62,7 @@ function waitFfmpegUntilError (command: ffmpeg.FfmpegCommand, successAfterMS = 1 }) } -async function testFfmpegStreamError (command: ffmpeg.FfmpegCommand, shouldHaveError: boolean) { +async function testFfmpegStreamError (command: FfmpegCommand, shouldHaveError: boolean) { let error: Error try { @@ -77,7 +77,7 @@ async function testFfmpegStreamError (command: ffmpeg.FfmpegCommand, shouldHaveE if (!shouldHaveError && error) throw error } -async function stopFfmpeg (command: ffmpeg.FfmpegCommand) { +async function stopFfmpeg (command: FfmpegCommand) { command.kill('SIGINT') await wait(500) -- cgit v1.2.3