fix: console assert only logs when arg 0 is falsy (#1530)

* fix: console assert only logs when arg 0 is falsy
This commit is contained in:
Paul D'Ambra
2024-07-02 14:28:24 +01:00
committed by GitHub
parent 89ae4d2bad
commit 874933b550
4 changed files with 53 additions and 36 deletions

View File

@@ -94,7 +94,10 @@ describe('rrweb-plugin-console-record', () => {
await page.goto(`${serverUrl}test/html/log.html`);
await page.evaluate(() => {
console.assert(0 === 0, 'assert');
// truthy assert does not log
console.assert(0 === 0, 'should not log assert');
// falsy assert does log
console.assert(false, 'should log assert');
console.count('count');
console.countReset('count');
console.debug('debug');