/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/ArrayHelpers.unittest.js
21 строка
441 B
Alexander Akait
style: set `arrowParens` to `true` (#19706)
16 июл 2025, 19:13
Не верифицирован
16 июл 2025, 19:13
703d9ac
Код
Авторство
О чём код?
"use strict"; const ArrayHelpers = require("../lib/util/ArrayHelpers"); describe("ArrayHelpers", () => { it("groupBy should partition into two arrays", () => { expect( ArrayHelpers.groupBy([1, 2, 3, 4, 5, 6], (x) => x % 2 === 0) ).toStrictEqual([ [2, 4, 6], [1, 3, 5] ]); }); it("groupBy works with empty array", () => { expect(ArrayHelpers.groupBy([], (x) => x % 2 === 0)).toStrictEqual([ [], [] ]); }); });