Commit 6326ad09 authored by Jerome Wu's avatar Jerome Wu

Optimize wv.test.js

parent 70dba705
...@@ -4,7 +4,7 @@ const { TIMEOUT } = require('./config'); ...@@ -4,7 +4,7 @@ const { TIMEOUT } = require('./config');
const { runFFmpeg } = require('./utils'); const { runFFmpeg } = require('./utils');
const IN_FILE_NAME = 'audio-1s.wav'; const IN_FILE_NAME = 'audio-1s.wav';
const OUT_FILE_NAME = 'audio.wv'; const OUT_FILE_NAME = 'audio.wv';
const WV_24BIT_SIZE = 23502; const WV_SIZE = 23502;
let wavData = null; let wavData = null;
beforeAll(() => { beforeAll(() => {
...@@ -14,5 +14,5 @@ beforeAll(() => { ...@@ -14,5 +14,5 @@ beforeAll(() => {
test('convert wav to wv', async () => { test('convert wav to wv', async () => {
const args = ['-i', IN_FILE_NAME, OUT_FILE_NAME]; const args = ['-i', IN_FILE_NAME, OUT_FILE_NAME];
const { fileSize } = await runFFmpeg(IN_FILE_NAME, wavData, args, OUT_FILE_NAME); const { fileSize } = await runFFmpeg(IN_FILE_NAME, wavData, args, OUT_FILE_NAME);
expect(fileSize).toBe(WV_24BIT_SIZE); expect(fileSize).toBe(WV_SIZE);
}, TIMEOUT); }, TIMEOUT);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment