1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 10:19:24 +02:00
Daniel Neto 2023-06-30 08:55:17 -03:00
parent 746e163d01
commit 1c7ea28b46
808 changed files with 316395 additions and 381162 deletions

View file

@ -4,9 +4,7 @@ import {
flatten,
range,
from,
findIndexes,
findIndex,
includes
findIndexes
} from '../src/utils/list';
import { findChildren, getContent } from '../src/utils/xml';
import {DOMParser} from '@xmldom/xmldom';
@ -199,26 +197,6 @@ QUnit.test('indexes found', function(assert) {
], 'b'), [1, 2]);
});
QUnit.module('findIndex');
QUnit.test('match', function(assert) {
assert.equal(findIndex([2, 'b', 'a'], (el) => el === 'a'), 2, 'returned index');
});
QUnit.test('no match', function(assert) {
assert.equal(findIndex([], (el) => el === 'a'), -1, 'no match');
});
QUnit.module('includes');
QUnit.test('match', function(assert) {
assert.ok(includes([2, 'b', 'a'], 'a'), 'match found');
});
QUnit.test('no match', function(assert) {
assert.notOk(includes([], 'a'), 'no match');
});
QUnit.module('xml', {
beforeEach() {
const parser = new DOMParser();