fix: always callback error with invalid print settings (#24476)
This commit is contained in:
parent
5737fda154
commit
6c4017ff45
4 changed files with 65 additions and 14 deletions
|
@ -141,6 +141,17 @@ describe('webContents module', () => {
|
|||
}).to.throw('Unsupported pageSize: i-am-a-bad-pagesize');
|
||||
});
|
||||
|
||||
it('throws when an invalid custom pageSize is passed', () => {
|
||||
expect(() => {
|
||||
w.webContents.print({
|
||||
pageSize: {
|
||||
width: 100,
|
||||
height: 200
|
||||
}
|
||||
});
|
||||
}).to.throw('height and width properties must be minimum 352 microns.');
|
||||
});
|
||||
|
||||
it('does not crash with custom margins', () => {
|
||||
expect(() => {
|
||||
w.webContents.print({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue