@vtex/vtexis-compatibility-layer
Version:
Compatibility layer between intelligent search and VTEX
11 lines (10 loc) • 550 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const getProductsCountAndPage_1 = require("../getProductsCountAndPage");
describe('getProductsCountAndPage', () => {
it('should convert from/to to page/count', () => {
expect(getProductsCountAndPage_1.getProductsCountAndPage(0, 9)).toStrictEqual([10, 1]);
expect(getProductsCountAndPage_1.getProductsCountAndPage(10, 19)).toStrictEqual([10, 2]);
expect(getProductsCountAndPage_1.getProductsCountAndPage(0, 2)).toStrictEqual([3, 1]);
});
});