Files
overleaf-cep/services/web/test/frontend/cut-log-noise.ts
T
Jakob Ackermann d697f00525 [web] reduce log noise in CI (#27961)
* [web] reduce noise from CollectPayPalPastDueInvoiceTest

* [web] reduce noise for frontend tests that use Range.getClientRects

* [web] avoid nesting <li> elements in ProjectToolsMoreDropdownButton

RenameProjectMenuItem/CopyProjectMenuItem will return <li> elements.

* [web] avoid clicking on links that navigate away in JSDom

* [web] add mock for location change in JSDom

* [web] add fallback stripe subscription data for test

3.8k lines of log noise!

GitOrigin-RevId: 7adab182487a6c07ac9809c60802e498a0edb0ec
2025-08-19 08:05:50 +00:00

16 lines
423 B
TypeScript

/* eslint-disable no-console */
import { debugConsole } from '@/utils/debugging'
if (process.env.VERBOSE_LOGGING === 'true') {
debugConsole.debug = console.debug
debugConsole.log = console.log
} else {
debugConsole.warn = () => {}
debugConsole.error = () => {}
}
before(function () {
// Range.getClientRects doesn't exist yet in jsdom
window.Range.prototype.getClientRects = () => [] as any as DOMRectList
})