Skip to content

Commit d3d054f

Browse files
committed
Adding an extra test to ensure quote params work even if no spaces
1 parent fac303d commit d3d054f

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

tests/constants.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const OPTIONS = {
88
};
99
const FLAME_MP4_LENGTH = 100374;
1010
const META_FLAME_MP4_LENGTH = 100408;
11+
const META_FLAME_MP4_LENGTH_NO_SPACE = 100404;
1112

1213
if (typeof module !== 'undefined') {
1314
module.exports = {
@@ -17,5 +18,6 @@ if (typeof module !== 'undefined') {
1718
OPTIONS,
1819
FLAME_MP4_LENGTH,
1920
META_FLAME_MP4_LENGTH,
21+
META_FLAME_MP4_LENGTH_NO_SPACE,
2022
};
2123
}

tests/ffmpeg.test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ describe('transcode()', () => {
2020
});
2121

2222
describe('run()', () => {
23+
describe('should run a command with quoted parameters at start no spaces', () => {
24+
['flame.avi'].forEach((name) => (
25+
it(`run ${name}`, async () => {
26+
await worker.write(name, `${BASE_URL}/${name}`);
27+
await worker.run(`-y -i ${name} -metadata 'title="test"' output.mp4`);
28+
const { data } = await worker.read('output.mp4');
29+
expect(data.length).to.be(META_FLAME_MP4_LENGTH_NO_SPACE);
30+
}).timeout(TIMEOUT)
31+
));
32+
});
33+
2334
describe('should run a command with quoted parameters at start and a space in between', () => {
2435
['flame.avi'].forEach((name) => (
2536
it(`run ${name}`, async () => {

0 commit comments

Comments
 (0)