Skip to content

Commit

Permalink
Fix broken Matroska unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Borewit committed Aug 15, 2024
1 parent b080e8a commit 1d8fc46
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions test/test-file-matroska.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ describe('Matroska formats', () => {

const filePath = path.join(matroskaSamplePath, 'My Baby Boy.webm');

const {format, common, native} = await mm.parseFile(filePath, {duration: true});
const {format, common} = await mm.parseFile(filePath, {duration: true});
assert.strictEqual(format.container, 'EBML/webm', 'format.container');
assert.strictEqual(format.codec, 'OPUS', 'format.codec');

Expand Down Expand Up @@ -175,14 +175,12 @@ describe('Matroska formats', () => {
});

// https://github.com/Borewit/music-metadata/issues/1463
it('Handle Matroska file without duration', () => {
it('Handle Matroska file without duration', async () => {

it('sample"', async () => {
const filePath = path.join(matroskaSamplePath, 'no-duration.webm');
const {format} = await mm.parseFile(filePath);
assert.isNotNaN(format.duration, 'Duration should not be NaN');
assert.isUndefined(format.duration, 'Duration is not defined');
});
const filePath = path.join(matroskaSamplePath, 'no-duration.webm');
const {format} = await mm.parseFile(filePath);
assert.strictEqual(format.container, 'EBML/webm', 'format.container');
assert.isUndefined(format.duration, 'format.duration');
});

});

0 comments on commit 1d8fc46

Please sign in to comment.