diff --git a/tests/constants.js b/tests/constants.js index 5d3eb39..5810085 100644 --- a/tests/constants.js +++ b/tests/constants.js @@ -8,6 +8,7 @@ const OPTIONS = { }; const FLAME_MP4_LENGTH = 100374; const META_FLAME_MP4_LENGTH = 100408; +const META_FLAME_MP4_LENGTH_NO_SPACE = 100404; if (typeof module !== 'undefined') { module.exports = { @@ -17,5 +18,6 @@ if (typeof module !== 'undefined') { OPTIONS, FLAME_MP4_LENGTH, META_FLAME_MP4_LENGTH, + META_FLAME_MP4_LENGTH_NO_SPACE, }; } diff --git a/tests/ffmpeg.test.js b/tests/ffmpeg.test.js index ce33ea9..5a2243b 100644 --- a/tests/ffmpeg.test.js +++ b/tests/ffmpeg.test.js @@ -20,6 +20,17 @@ describe('transcode()', () => { }); describe('run()', () => { + describe('should run a command with quoted parameters at start no spaces', () => { + ['flame.avi'].forEach((name) => ( + it(`run ${name}`, async () => { + await worker.write(name, `${BASE_URL}/${name}`); + await worker.run(`-y -i ${name} -metadata 'title="test"' output.mp4`); + const { data } = await worker.read('output.mp4'); + expect(data.length).to.be(META_FLAME_MP4_LENGTH_NO_SPACE); + }).timeout(TIMEOUT) + )); + }); + describe('should run a command with quoted parameters at start and a space in between', () => { ['flame.avi'].forEach((name) => ( it(`run ${name}`, async () => {