This commit is contained in:
skdhg committed 2023-07-15 18:36:43 +05:45
1 parent 8d6839244a
commit dd706e7f23
14 files changed
+766 -8

No files matched your search

Binary file not shown.
+12 -3
View File
@@ -1,7 +1,16 @@
import test from 'ava'
import { probe } from '../index.js'
import { readFile } from 'fs/promises';
import { sum } from '../index.js'
test('should probe mp3 buffer', async (t) => {
const chunk = await readFile('./__test__/data/head.mp3');
test('sum from native', (t) => {
t.is(sum(1, 2), 3)
t.deepEqual(probe(chunk), {
channels: 2,
sampleRate: 44100,
framesPerBlock: 0,
codec: 4099,
nFrames: 796032,
duration: 18
});
})