Fix some unit test warnings

Summary: Supress a bunch of ugly emotion warnings, which are completely irrelevant to use as they are about SSR. Also made stacktrac e a bit longer by default.

Reviewed By: passy

Differential Revision: D28226306

fbshipit-source-id: 9060cf2c349a265ce6b479eea252fdcfc9a6c5f2
This commit is contained in:
Michel Weststrate
2021-05-06 04:26:41 -07:00
committed by Facebook GitHub Bot
parent 0c2348ebdb
commit 0f8a21f431
2 changed files with 14 additions and 1 deletions

View File

@@ -256,7 +256,7 @@
"test-with-device": "yarn build:tsc && USE_ELECTRON_STUBS=1 jest --testMatch=\"**/**.device\\.(js|jsx|ts|tsx)\" --detectOpenHandles",
"test:debug": "yarn build:tsc && node --inspect node_modules/.bin/jest --runInBand",
"tsc-plugins": "./ts-node scripts/tsc-plugins.ts",
"watch": "node --expose-gc ./node_modules/.bin/jest --watch"
"watch": "node --expose-gc --stack-trace-limit=40 ./node_modules/.bin/jest --watch"
},
"version": "0.87.0",
"workspaces": {

View File

@@ -0,0 +1,13 @@
diff --git a/node_modules/@emotion/cache/dist/emotion-cache.cjs.dev.js b/node_modules/@emotion/cache/dist/emotion-cache.cjs.dev.js
index b25808a..043f626 100644
--- a/node_modules/@emotion/cache/dist/emotion-cache.cjs.dev.js
+++ b/node_modules/@emotion/cache/dist/emotion-cache.cjs.dev.js
@@ -136,7 +136,7 @@ var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {
}
unsafePseudoClasses.forEach(function (unsafePseudoClass) {
- console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\".");
+// we're not doing SSR and not interested in pedantic errors: console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\".");
});
}
};