mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-09 17:51:46 +00:00
37 lines
503 B
JavaScript
37 lines
503 B
JavaScript
const { test, expect } = require('@playwright/test');
|
|
|
|
const { sortSegments } = require('../segments');
|
|
|
|
test('Segment sorting', () => {
|
|
expect(
|
|
sortSegments([
|
|
[0, 3],
|
|
[7, 8],
|
|
[5, 6],
|
|
]),
|
|
).toEqual([
|
|
[0, 3],
|
|
[5, 6],
|
|
[7, 8],
|
|
]);
|
|
|
|
expect(
|
|
sortSegments([
|
|
[0, 5],
|
|
[6, 8],
|
|
[4, 6],
|
|
]),
|
|
).toEqual([[0, 8]]);
|
|
|
|
expect(
|
|
sortSegments([
|
|
[0, 6],
|
|
[7, 8],
|
|
[4, 6],
|
|
]),
|
|
).toEqual([
|
|
[0, 6],
|
|
[7, 8],
|
|
]);
|
|
});
|