mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-14 03:41:46 +00:00
QOL: Move source code under the src directory. (#1318)
This commit is contained in:
36
src/plugins/sponsorblock/tests/segments.test.js
Normal file
36
src/plugins/sponsorblock/tests/segments.test.js
Normal file
@ -0,0 +1,36 @@
|
||||
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],
|
||||
]);
|
||||
});
|
||||
Reference in New Issue
Block a user