fix tests

This commit is contained in:
Yury Semikhatsky 2024-11-11 11:01:02 -08:00
parent 7b05c4ebfc
commit e0e735b71e

View file

@ -265,9 +265,10 @@ function toPascal(value: string): string {
return value[0].toUpperCase() + value.slice(1); return value[0].toUpperCase() + value.slice(1);
} }
function formatContextOptions(options: BrowserContextOptions, deviceName: string | undefined): string { function formatContextOptions(contextOptions: BrowserContextOptions, deviceName: string | undefined): string {
let options = { ...contextOptions };
// recordHAR is replaced with routeFromHAR in the generated code. // recordHAR is replaced with routeFromHAR in the generated code.
options = { ...options, recordHar: undefined }; delete options.recordHar;
const device = deviceName && deviceDescriptors[deviceName]; const device = deviceName && deviceDescriptors[deviceName];
if (!device) { if (!device) {
if (!Object.entries(options).length) if (!Object.entries(options).length)