Skip to content

Commit

Permalink
chore: assert location value of ConsoleMessage in tests (#6282)
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Jul 29, 2020
1 parent 713e990 commit 9bc063b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/page.spec.ts
Expand Up @@ -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' });
Expand Down

0 comments on commit 9bc063b

Please sign in to comment.