test: use as const to remove some usages of as any (#39475)
This commit is contained in:
parent
9eeef55469
commit
effafdf498
3 changed files with 17 additions and 17 deletions
|
@ -1280,9 +1280,9 @@ describe('webContents module', () => {
|
|||
'default_public_interface_only',
|
||||
'default_public_and_private_interfaces',
|
||||
'disable_non_proxied_udp'
|
||||
];
|
||||
] as const;
|
||||
policies.forEach((policy) => {
|
||||
w.webContents.setWebRTCIPHandlingPolicy(policy as any);
|
||||
w.webContents.setWebRTCIPHandlingPolicy(policy);
|
||||
expect(w.webContents.getWebRTCIPHandlingPolicy()).to.equal(policy);
|
||||
});
|
||||
});
|
||||
|
@ -2254,7 +2254,7 @@ describe('webContents module', () => {
|
|||
const promise = once(w.webContents, 'context-menu') as Promise<[any, Electron.ContextMenuParams]>;
|
||||
|
||||
// Simulate right-click to create context-menu event.
|
||||
const opts = { x: 0, y: 0, button: 'right' as any };
|
||||
const opts = { x: 0, y: 0, button: 'right' as const };
|
||||
w.webContents.sendInputEvent({ ...opts, type: 'mouseDown' });
|
||||
w.webContents.sendInputEvent({ ...opts, type: 'mouseUp' });
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue