angrykoala / wendigo

A proper monster for front-end automated testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Errors are not stringified in logs

dgunay opened this issue · comments

#209 fixed this for normal objects, but currently when the page logs errors, I get something like this:

"During provider setup:  JSHandle@error "

Would it be an easy fix to just change this line to work with JSHandle@error?

export async function stringifyLogText(log: ConsoleMessage): Promise<string> {
const text = log.text();
if (text.includes('JSHandle@object')) {
const args = await Promise.all(log.args().map(stringifyLogArg));
return args.join(' ');
}
return text;
}