mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
feat: allow defaulting to printer default page size (#49523)
Co-authored-by: Edvan de Matos <edvan.santos@querodelivery.com>
This commit is contained in:
@@ -273,6 +273,12 @@ describe('webContents module', () => {
|
||||
}).to.throw(`Unsupported pageSize: ${badSize}`);
|
||||
});
|
||||
|
||||
it('throws when a user passes both pageSize and usePrinterDefaultPageSize', () => {
|
||||
expect(() => {
|
||||
w.webContents.print({ pageSize: 'A4', usePrinterDefaultPageSize: true });
|
||||
}).to.throw('usePrinterDefaultPageSize cannot be combined with pageSize');
|
||||
});
|
||||
|
||||
it('throws when an invalid callback is passed', () => {
|
||||
expect(() => {
|
||||
// @ts-ignore this line is intentionally incorrect
|
||||
|
||||
Reference in New Issue
Block a user