devextreme
Version:
JavaScript/TypeScript Component Suite for Responsive Web Development
27 lines (26 loc) • 805 B
JavaScript
/**
* DevExtreme (esm/__internal/grids/new/card_view/content_view/utils.test.js)
* Version: 25.2.7
* Build date: Tue May 05 2026
*
* Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import {
describe,
expect,
it
} from "@jest/globals";
import {
factors
} from "./utils";
describe("factors", () => {
it("should return all factors of given number", () => {
expect(factors(1)).toEqual([1]);
expect(factors(2)).toEqual([1, 2]);
expect(factors(7)).toEqual([1, 7]);
expect(factors(6)).toEqual([1, 2, 3, 6]);
expect(factors(8)).toEqual([1, 2, 4, 8]);
expect(factors(12)).toEqual([1, 2, 3, 4, 6, 12])
})
});