cleanup console.logs and moved to proper log level console to make finding stray console.logs easier

This commit is contained in:
Henry Jameson 2025-01-28 16:28:23 +02:00
commit 7f9fe6b660
16 changed files with 50 additions and 59 deletions

View file

@ -539,7 +539,6 @@ describe('RichContent', () => {
`,
props: ['handleLinks', 'attentions', 'vhtml']
}
console.log(1)
const ptest = (handleLinks, vhtml) => {
const t0 = performance.now()
@ -562,11 +561,11 @@ describe('RichContent', () => {
return `Mount: ${t1 - t0}ms, destroy: ${t2 - t1}ms, avg ${(t1 - t0) / amount}ms - ${(t2 - t1) / amount}ms per item`
}
console.log(`${amount} items with links handling:`)
console.log(ptest(true))
console.log(`${amount} items without links handling:`)
console.log(ptest(false))
console.log(`${amount} items plain v-html:`)
console.log(ptest(false, true))
console.debug(`${amount} items with links handling:`)
console.debug(ptest(true))
console.debug(`${amount} items without links handling:`)
console.debug(ptest(false))
console.debug(`${amount} items plain v-html:`)
console.debug(ptest(false, true))
})
})

View file

@ -21,17 +21,17 @@ describe('ISS (de)serialization', () => {
const onlyComponent = componentsContext('./components/panel_header.style.js').default
it.only(`(De)serialization of component ${onlyComponent.name} works`, () => {
const normalized = onlyComponent.defaultRules.map(x => ({ component: onlyComponent.name, ...x }))
console.log('BEGIN INPUT ================')
console.log(normalized)
console.log('END INPUT ==================')
console.debug('BEGIN INPUT ================')
console.debug(normalized)
console.debug('END INPUT ==================')
const serialized = serialize(normalized)
console.log('BEGIN SERIAL ===============')
console.log(serialized)
console.log('END SERIAL =================')
console.debug('BEGIN SERIAL ===============')
console.debug(serialized)
console.debug('END SERIAL =================')
const deserialized = deserialize(serialized)
console.log('BEGIN DESERIALIZED =========')
console.log(serialized)
console.log('END DESERIALIZED ===========')
console.debug('BEGIN DESERIALIZED =========')
console.debug(serialized)
console.debug('END DESERIALIZED ===========')
// for some reason comparing objects directly fails the assert
expect(JSON.stringify(deserialized, null, 2)).to.equal(JSON.stringify(normalized, null, 2))