Skip to content

Commit

Permalink
added in more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dhuang612 committed Oct 16, 2019
1 parent 4b7e96f commit ad8f025
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@
"files": [
"test/window-header.js",
"test/keyboard-number-input.js",
"test/open-files.js",
"test/encoding.js",
"!/test/editor"
],
"require": [
Expand Down
12 changes: 12 additions & 0 deletions test/encoding.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import test from 'ava';
import ffmpeg from '@ffmpeg-installer/ffmpeg';
import execa from 'execa';

test('it should be able to find ffmpeg', t => {
t.deepEqual(ffmpeg, ffmpeg);
});

test('it should be able to find execa', t => {
t.deepEqual(execa, execa);
});

12 changes: 12 additions & 0 deletions test/open-files.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import test from 'ava';
import supportedVideoExtensions from '../main/common/constants';

test('it should support mp4 mov and m4v', t => {
t.deepEqual(supportedVideoExtensions, {supportedVideoExtensions: ['mp4', 'mov', 'm4v']});
});

test('file extensions should equal .mp4 .mov and .m4v', t => {
const supportedVideoExtensions = ['mp4', 'mov', 'm4v'];
const fileExtensions = supportedVideoExtensions.map(ext => `.${ext}`);
t.deepEqual(fileExtensions, ['.mp4', '.mov', '.m4v']);
});

0 comments on commit ad8f025

Please sign in to comment.