mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-22 18:32:34 +01:00
add test for xmeml #839
This commit is contained in:
parent
3db3241ccd
commit
9ea7dcd46e
30
src/__snapshots__/edlFormats.test.js.snap
Normal file
30
src/__snapshots__/edlFormats.test.js.snap
Normal file
@ -0,0 +1,30 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`parses xmeml 1 1`] = `
|
||||
Array [
|
||||
Object {
|
||||
"end": 8.56,
|
||||
"start": 0,
|
||||
},
|
||||
Object {
|
||||
"end": 13.12,
|
||||
"start": 8.56,
|
||||
},
|
||||
Object {
|
||||
"end": 19.12,
|
||||
"start": 13.12,
|
||||
},
|
||||
Object {
|
||||
"end": 27.96,
|
||||
"start": 19.12,
|
||||
},
|
||||
Object {
|
||||
"end": 39.08,
|
||||
"start": 27.96,
|
||||
},
|
||||
Object {
|
||||
"end": 49.36,
|
||||
"start": 39.08,
|
||||
},
|
||||
]
|
||||
`;
|
@ -1,7 +1,9 @@
|
||||
import fs from 'fs';
|
||||
import { join } from 'path';
|
||||
|
||||
import { parseYouTube, formatYouTube, parseMplayerEdl } from './edlFormats';
|
||||
import { parseYouTube, formatYouTube, parseMplayerEdl, parseXmeml } from './edlFormats';
|
||||
|
||||
const readFixture = async (name, encoding = 'utf-8') => fs.promises.readFile(join(__dirname, 'fixtures', name), encoding);
|
||||
|
||||
it('parseYoutube', () => {
|
||||
const str = `
|
||||
@ -83,7 +85,7 @@ it('parseMplayerEdl', async () => {
|
||||
`;
|
||||
*/
|
||||
|
||||
const str = await fs.promises.readFile(join(__dirname, 'fixtures', 'mplayer.edl'), 'utf-8');
|
||||
const str = await readFixture('mplayer.edl');
|
||||
|
||||
expect(await parseMplayerEdl(str)).toEqual([
|
||||
{ start: 0,
|
||||
@ -129,3 +131,7 @@ it('parseMplayerEdl, starting at 0', async () => {
|
||||
},
|
||||
}]);
|
||||
});
|
||||
|
||||
it('parses xmeml 1', async () => {
|
||||
expect(await parseXmeml(await readFixture('Final Cut Pro XMEML.xml'))).toMatchSnapshot();
|
||||
});
|
||||
|
1511
src/fixtures/Final Cut Pro XMEML.xml
Normal file
1511
src/fixtures/Final Cut Pro XMEML.xml
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user