mirror of
https://github.com/darksaid98/mediaplex.git
synced 2026-12-01 14:38:45 +00:00
17 lines
365 B
JavaScript
17 lines
365 B
JavaScript
import test from 'ava'
|
|
import { probe } from '../index.js'
|
|
import { readFile } from 'fs/promises';
|
|
|
|
test('should probe mp3 buffer', async (t) => {
|
|
const chunk = await readFile('./__test__/data/head.mp3');
|
|
|
|
t.deepEqual(probe(chunk), {
|
|
channels: 2,
|
|
sampleRate: 44100,
|
|
framesPerBlock: 0,
|
|
codec: 4099,
|
|
nFrames: 796032,
|
|
duration: 18
|
|
});
|
|
})
|