mirror of
https://github.com/foliojs/pdfkit.git
synced 2025-12-08 20:15:54 +00:00
22 lines
484 B
JavaScript
22 lines
484 B
JavaScript
import PDFDocument from '../../lib/document';
|
|
|
|
describe('Image', function () {
|
|
/**
|
|
* @type {PDFDocument}
|
|
*/
|
|
let document;
|
|
|
|
beforeEach(() => {
|
|
document = new PDFDocument({
|
|
info: { CreationDate: new Date(Date.UTC(2018, 1, 1)) },
|
|
});
|
|
});
|
|
|
|
test('y position should be updated', () => {
|
|
const originalY = document.y;
|
|
const imageHeight = 400;
|
|
document.image('./tests/images/bee.png');
|
|
expect(document.y).toBe(originalY + imageHeight);
|
|
});
|
|
});
|