Skip to content

Commit 94da17e

Browse files
javachefacebook-github-bot
authored andcommitted
Stub nativeFabricUIManager for jest tests (#41408)
Summary: Pull Request resolved: #41408 When FabricRenderer is used during jests it will currently error out since `nativeFabricUIManager` is nog a configured global. Changelog: [Internal] Reviewed By: christophpurrer Differential Revision: D51198314 fbshipit-source-id: 4db1450f6b36699311692c2cd467184f6abea518
1 parent c267a06 commit 94da17e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/react-native/jest/setup.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ Object.defineProperties(global, {
2727
value: id => clearTimeout(id),
2828
writable: true,
2929
},
30+
nativeFabricUIManager: {
31+
configurable: true,
32+
enumerable: true,
33+
value: {},
34+
writable: true,
35+
},
3036
performance: {
3137
configurable: true,
3238
enumerable: true,

0 commit comments

Comments
 (0)