mirror of
https://github.com/jzillmann/pdf-to-markdown.git
synced 2024-12-11 09:01:07 +01:00
13 lines
439 B
TypeScript
13 lines
439 B
TypeScript
|
import PageMapping from 'src/PageMapping';
|
||
|
|
||
|
test('1-to-1', async () => {
|
||
|
const mapping = new PageMapping(0, false);
|
||
|
expect(mapping.pageFactor).toEqual(0);
|
||
|
expect([...Array(3).keys()].map((i) => mapping.pageLabel(i))).toEqual(['1', '2', '3']);
|
||
|
});
|
||
|
|
||
|
test('lame start', async () => {
|
||
|
const mapping = new PageMapping(-3, true);
|
||
|
expect([...Array(5).keys()].map((i) => mapping.pageLabel(i))).toEqual(['I', 'II', 'III', '1', '2']);
|
||
|
});
|