░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
pplmvsvm
LOCATION:
/var/www/canvas/packages/canvas-planner/jest
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: jest-setup.js
/* * Copyright (C) 2023 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License along * with this program. If not, see <http://www.gnu.org/licenses/>. */ /** * We want to ensure errors and warnings get appropriate eyes. If * you are seeing an exception from here, it probably means you * have an unintended consequence from your changes. If you expect * the warning/error, add it to the ignore list below. */ /* eslint-disable no-console */ const globalError = global.console.error const ignoredErrors = [/A theme registry has already been initialized/] const globalWarn = global.console.warn const ignoredWarnings = [/\[Focusable\] Exactly one focusable child is required/] global.console = { log: console.log, error: error => { if (ignoredErrors.some(regex => regex.test(error))) { return } globalError(error) throw new Error( `Looks like you have an unhandled error. Keep our test logs clean by handling or filtering it. ${error}` ) }, warn: warning => { if (ignoredWarnings.some(regex => regex.test(warning))) { return } globalWarn(warning) throw new Error( `Looks like you have an unhandled warning. Keep our test logs clean by handling or filtering it. ${warning}` ) }, info: console.info, debug: console.debug, } /* eslint-enable no-console */
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 jest-setup.js
JS
1.8 KB
2023-09-24 03:39
EDIT