console plugin fix (#832)
* fix: empty payload in console-plugin * update unit test
This commit is contained in:
@@ -136,6 +136,8 @@ export function stringify(
|
||||
return value ? value.outerHTML : '';
|
||||
}
|
||||
return value.nodeName;
|
||||
} else if (value instanceof Error) {
|
||||
return value.name + ': ' + value.message;
|
||||
}
|
||||
return value;
|
||||
});
|
||||
|
||||
@@ -7806,6 +7806,21 @@ exports[`record integration tests should record console messages 1`] = `
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
\\"type\\": 6,
|
||||
\\"data\\": {
|
||||
\\"plugin\\": \\"rrweb/console@1\\",
|
||||
\\"payload\\": {
|
||||
\\"level\\": \\"log\\",
|
||||
\\"trace\\": [
|
||||
\\"__puppeteer_evaluation_script__:19:37\\"
|
||||
],
|
||||
\\"payload\\": [
|
||||
\\"\\\\\\"TypeError: a message\\\\\\"\\"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
\\"type\\": 3,
|
||||
\\"data\\": {
|
||||
|
||||
@@ -471,6 +471,7 @@ describe('record integration tests', function (this: ISuite) {
|
||||
console.trace('trace');
|
||||
console.warn('warn');
|
||||
console.clear();
|
||||
console.log(new TypeError('a message'));
|
||||
const iframe = document.createElement('iframe');
|
||||
document.body.appendChild(iframe);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user