mirror of
https://github.com/foliojs/pdfkit.git
synced 2025-12-08 20:15:54 +00:00
unit tests added
This commit is contained in:
parent
546a7f82a3
commit
89396ebe44
@ -32,4 +32,19 @@ describe('PDFDocument', () => {
|
||||
expect(fontSpy).not.toBeCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe('document info', () => {
|
||||
|
||||
test('accepts properties with value undefined', () => {
|
||||
expect(() => new PDFDocument({ info: { Title: undefined }}))
|
||||
.not.toThrow(new TypeError("Cannot read property 'toString' of undefined"));
|
||||
});
|
||||
|
||||
test('accepts properties with value null', () => {
|
||||
expect(() => new PDFDocument({ info: { Title: null }}))
|
||||
.not.toThrow(new TypeError("Cannot read property 'toString' of null"));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user