cut-log-noise.ts 423 B

123456789101112131415
  1. /* eslint-disable no-console */
  2. import { debugConsole } from '@/utils/debugging'
  3. if (process.env.VERBOSE_LOGGING === 'true') {
  4. debugConsole.debug = console.debug
  5. debugConsole.log = console.log
  6. } else {
  7. debugConsole.warn = () => {}
  8. debugConsole.error = () => {}
  9. }
  10. before(function () {
  11. // Range.getClientRects doesn't exist yet in jsdom
  12. window.Range.prototype.getClientRects = () => [] as any as DOMRectList
  13. })