"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const chai_1 = require("chai");
const core_utils_1 = require("../../../shared/core-utils");
const server_commands_1 = require("../../../shared/server-commands");
describe('Test print transcode jobs', function () {
    it('Should print the correct command for each resolution', function () {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            const fixturePath = (0, core_utils_1.buildAbsoluteFixturePath)('video_short.webm');
            for (const resolution of [
                720,
                1080
            ]) {
                const command = yield server_commands_1.CLICommand.exec(`npm run print-transcode-command -- ${fixturePath} -r ${resolution}`);
                (0, chai_1.expect)(command).to.includes(`-vf scale=w=-2:h=${resolution}`);
                (0, chai_1.expect)(command).to.includes(`-y -acodec aac -vcodec libx264`);
                (0, chai_1.expect)(command).to.includes('-f mp4');
                (0, chai_1.expect)(command).to.includes('-movflags faststart');
                (0, chai_1.expect)(command).to.includes('-b:a 256k');
                (0, chai_1.expect)(command).to.includes('-r 25');
                (0, chai_1.expect)(command).to.includes('-level:v 3.1');
                (0, chai_1.expect)(command).to.includes('-g:v 50');
                (0, chai_1.expect)(command).to.includes(`-maxrate:v `);
                (0, chai_1.expect)(command).to.includes(`-bufsize:v `);
            }
        });
    });
});
//# sourceMappingURL=print-transcode-command.js.map