Refactor tests

This commit is contained in:
Jerome Wu
2020-11-03 15:37:45 +08:00
parent 265cf4c580
commit 848f8ed21e
66 changed files with 51 additions and 54 deletions

View File

@@ -1,8 +1,7 @@
const TIMEOUT = 60000;
const BASE_URL = 'http://localhost:3000/tests/assets';
const IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined';
const OPTIONS = {
corePath: 'http://localhost:3000/node_modules/@ffmpeg/core/ffmpeg-core.js',
corePath: IS_BROWSER ? 'http://localhost:3000/node_modules/@ffmpeg/core/dist/ffmpeg-core.js' : '@ffmpeg/core',
};
const FLAME_MP4_LENGTH = 100374;
const META_FLAME_MP4_LENGTH = 100408;
@@ -11,7 +10,6 @@ const META_FLAME_MP4_LENGTH_NO_SPACE = 100404;
if (typeof module !== 'undefined') {
module.exports = {
TIMEOUT,
BASE_URL,
IS_BROWSER,
OPTIONS,
FLAME_MP4_LENGTH,