fix: webContents.print
parameter validation error (#38614)
This commit is contained in:
parent
e8fd5fd3a8
commit
c0d9764de9
3 changed files with 29 additions and 7 deletions
|
@ -194,6 +194,14 @@ describe('webContents module', () => {
|
|||
}).to.throw('webContents.print(): Invalid print settings specified.');
|
||||
});
|
||||
|
||||
it('throws when an invalid pageSize is passed', () => {
|
||||
const badSize = 5;
|
||||
expect(() => {
|
||||
// @ts-ignore this line is intentionally incorrect
|
||||
w.webContents.print({ pageSize: badSize });
|
||||
}).to.throw(`Unsupported pageSize: ${badSize}`);
|
||||
});
|
||||
|
||||
it('throws when an invalid callback is passed', () => {
|
||||
expect(() => {
|
||||
// @ts-ignore this line is intentionally incorrect
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue