mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore: assert location value of ConsoleMessage in tests (#6282)
This commit is contained in:
parent
713e990531
commit
9bc063b5ef
@ -461,6 +461,13 @@ describe('Page', function () {
|
||||
]);
|
||||
expect(message.text()).toEqual('hello 5 JSHandle@object');
|
||||
expect(message.type()).toEqual('log');
|
||||
expect(message.args()).toHaveLength(3);
|
||||
expect(message.location()).toEqual({
|
||||
url: expect.any(String),
|
||||
lineNumber: expect.any(Number),
|
||||
columnNumber: expect.any(Number),
|
||||
});
|
||||
|
||||
expect(await message.args()[0].jsonValue()).toEqual('hello');
|
||||
expect(await message.args()[1].jsonValue()).toEqual(5);
|
||||
expect(await message.args()[2].jsonValue()).toEqual({ foo: 'bar' });
|
||||
|
Loading…
Reference in New Issue
Block a user