mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 08:26:16 -04:00
tests: Disable deprecation warnings when testing deprecated functions
This commit is contained in:
parent
c4f18a9b3a
commit
6beb5dcaf5
2 changed files with 21 additions and 10 deletions
|
@ -101,6 +101,7 @@ const padutils = {
|
|||
* @param {...*} args - Passed to `console.warn`, with a stack trace appended.
|
||||
*/
|
||||
warnDeprecated: (...args) => {
|
||||
if (padutils.warnDeprecated.disabledForTestingOnly) return;
|
||||
const err = new Error();
|
||||
if (Error.captureStackTrace) Error.captureStackTrace(err, padutils.warnDeprecated);
|
||||
err.name = '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue