chore: remove fake error from expect calls (#28112)

We used to have a fake `error` property, so that trace viewer shows
failed expectes as such. Today, we have a step for each expect that
contains a proper error. Sending the fake error to the client confuses
language ports.
This commit is contained in:
Dmitry Gozman 2023-11-13 16:39:05 -08:00 committed by GitHub
parent ec4893d235
commit 2c3955a28c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -256,8 +256,6 @@ export class FrameDispatcher extends Dispatcher<Frame, channels.FrameChannel, Br
const result = await this._frame.expect(metadata, params.selector, { ...params, expectedValue });
if (result.received !== undefined)
result.received = serializeResult(result.received);
if (result.matches === params.isNot)
metadata.error = { error: { name: 'Expect', message: 'Expect failed' } };
return result;
}
}