Skip to content

Commit

Permalink
fix ut bug (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
EverettSummer authored Jan 14, 2023
1 parent 22c20e3 commit 6c52468
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/processors/LocalConvertProcessor.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 IROHA LAB
* Copyright 2023 IROHA LAB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -43,6 +43,7 @@ import { ProfileFactory, ProfileFactoryInitiator } from './profiles/ProfileFacto
import { TYPES_VM } from '../TYPES';
import { BaseProfile } from './profiles/BaseProfile';
import { rm } from 'fs/promises';
import { DefaultExtractor } from './extractors/DefaultExtractor';

type Cxt = { container: Container };
const testVideoFile = 'test-video-2.mkv';
Expand Down Expand Up @@ -76,9 +77,11 @@ test('Default Profile', async (t) => {
const subtitleFilePath = await fileManager.downloadFile(jobMessage.otherFiles[0], jobMessage.downloadAppId, jobMessage.id);

const extractAction = new ExtractAction();
extractAction.extractorId = DefaultExtractor.Id;
extractAction.extractTarget = ExtractTarget.KeepContainer;
extractAction.extractFrom = ExtractSource.VideoFile;
const subExtractAction = new ExtractAction();
subExtractAction.extractorId = DefaultExtractor.Id;
subExtractAction.extractTarget = ExtractTarget.Subtitle;
subExtractAction.extractFrom = ExtractSource.OtherFiles;

Expand Down
6 changes: 3 additions & 3 deletions src/processors/LocalExtractProcessor.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 IROHA LAB
* Copyright 2023 IROHA LAB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -85,7 +85,7 @@ test('DefaultExtractor', async (t) => {
const jobMessage = prepareJobMessage(testVideoFile, [testSubtitleFile]);

const videoExtractAction = new ExtractAction();
videoExtractAction.extractorId = 'Default';
videoExtractAction.extractorId = DefaultExtractor.Id;
videoExtractAction.extractTarget = ExtractTarget.KeepContainer;
videoExtractAction.extractFrom = ExtractSource.VideoFile;

Expand Down Expand Up @@ -140,7 +140,7 @@ test('DefaultExtractor extract ass from mkv', async (t) => {
const jobMessage = prepareJobMessage('test-video-with-sub.mkv');

const action = new ExtractAction();
action.extractorId = 'Default';
action.extractorId = DefaultExtractor.Id;
action.extractTarget = ExtractTarget.Subtitle;
action.extractFrom = ExtractSource.VideoFile;
action.outputExtname = 'ass'
Expand Down

0 comments on commit 6c52468

Please sign in to comment.