UNPKG

react-konva-grid

Version:

Canvas grid to render large set of tabular data with virtualization.

20 lines 724 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const helpers_1 = require("./helpers"); describe("getBoundedCells", () => { it("returns empty for undefined area", () => { const cells = helpers_1.getBoundedCells(undefined); expect(cells.size).toBe(0); }); it("returns accurate top, left, right and bottom indexs", () => { const cells = helpers_1.getBoundedCells({ top: 1, right: 5, left: 1, bottom: 5, }); expect(cells.has(helpers_1.cellIndentifier(1, 1))).toBeTruthy(); expect(cells.has(helpers_1.cellIndentifier(5, 5))).toBeTruthy(); }); }); //# sourceMappingURL=helpers.test.js.map