import Pagination from '../../src/components/pagination'; import { Logger } from '../../src/utils/toolbox/src'; import { dummyFunc } from '../../src/globals/helpers/helpers'; describe('Pagination initialization testing', () => { let pagination; test('Pagination component should fallback to defalt page options', (done)=>{ pagination = new Pagination({ pagination: { enable: true, pagesize: { options: true } }, currentScreenWidth: 1000, logger: new Logger(dummyFunc), dispatchEvent: dummyFunc, bodyHeight: 500, rowHeight: 50, // @ts-ignore totalRows: 90 }); expect(pagination.config.calculatedPageOptions).toBe([10, 20, 50, 100]); done(); }); });