From 3cda6237efaaf2f6b4c3775c9d1eed36047ec11d Mon Sep 17 00:00:00 2001 From: Christoph Wurst <christoph@winzerhof-wurst.at> Date: Thu, 9 May 2019 18:09:06 +0200 Subject: [PATCH] Do not show deprecation warnings during test runs Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at> --- core/js/dist/main.js | Bin 1250965 -> 1251009 bytes core/js/dist/main.js.map | Bin 4257976 -> 4258193 bytes core/src/globals.js | 12 +++++++++--- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/core/js/dist/main.js b/core/js/dist/main.js index 41846f27957feb8397f7f48bbbe672a00e768df0..1fa5e33fdc426cf3642df1cb5b127ff8f26c0c46 100644 GIT binary patch delta 385 zcmbQb*5}|_pN1C37N!>F7M2#)7Pc1l7LFFq7OocV7M>Q~7QPn#7J(MQEkcQhTr{i8 z@-tHu3~X&}%QN#*^2_x?T!TYA{oK{mlJoP5^K(-5$`gz7^b!jSaw;{TLOO{>>7}`; zc_qb~wK~qJ(*?DdMW$yT5)x+$PMzL&NT{9Bb^1X^CgJIthlQe8gHtu~?5CePEF?XB z?O`E4Myu^Wwk{*1^YkA_gq(p&ZH@}L0;#5>LdHO9+fkuVAjNY`$N)&$9usl`QVqw1 zY=G3>V?wDweagp$R2iKoUyKsn9(P>mIWvSkJ^HlJ5=Q4~XN1h40zgT==}~8d7BV_- z|8qu2pPSKRyUq<Ed1gkB={~oGjsv+OcZ8~?83VRY_%2k=#P6S~k*Zl;lv+|+l&9gJ zI#rP4)b<Czgf=n*RZRLPR4K^lznw=w_%suzXR2+chN*$3_4dFgLP^Zioy3Gy89k?G IhzaWg0MqP-q5uE@ delta 326 zcmX@O)@SNkpN1C37N!>F7M2#)7Pc1l7LFFq7OocV7M>Q~7QPn#7J(MQEkcQhrb}xv zb4}lQNJxBo*Kr}f=~oU3wK6(SKj_FLJU#cYP!v<1{d9*WpzO87Lh?+SR&b8scEKY; zLX3>T(^ZZNIRmw192If}QtOTi83U<DM}<Oxl*KV210a=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@FMU<;H6e$bYg8ltOO?B q-M?DMZxpg?=j$uwd@CHB_=ZXR)Oq}XcyDUr1@*7x2~Ax7<^KT0ST`&H diff --git a/core/src/globals.js b/core/src/globals.js index 8476ccaf18e..312952fe90c 100644 --- a/core/src/globals.js +++ b/core/src/globals.js @@ -21,6 +21,12 @@ import appswebroots from "./OC/appswebroots"; +const warnIfNotTesting = function() { + if (window.TESTING === undefined) { + console.warn.apply(console, arguments) + } +} + /** * * @param {Function} func the library to deprecate @@ -29,7 +35,7 @@ import appswebroots from "./OC/appswebroots"; const deprecate = (func, funcName) => { const oldFunc = func const newFunc = function() { - console.warn(`The ${funcName} library is deprecated! It will be removed in nextcloud 19.`) + warnIfNotTesting(`The ${funcName} library is deprecated! It will be removed in nextcloud 19.`) return oldFunc.apply(this, arguments) } Object.assign(newFunc, oldFunc) @@ -43,9 +49,9 @@ const setDeprecatedProp = (global, val, msg) => { Object.defineProperty(window, global, { get: () => { if (msg) { - console.warn(`${global} is deprecated: ${msg}`) + warnIfNotTesting(`${global} is deprecated: ${msg}`) } else { - console.warn(`${global} is deprecated`) + warnIfNotTesting(`${global} is deprecated`) } return val } -- GitLab