我遵循 - 或嘗試了幾個職位如何做到這一點,包括airbnb酶指南(分開)react-native
和jest
。 (延續:https://medium.com/@childsmaidment/testing-react-native-components-with-enzyme-d46bf735540#.6sxq10kgt,https://blog.callstack.io/unit-testing-react-native-with-the-new-jest-i-snapshots-come-into-play-68ba19b1b9fe#.4iqylmqh5或How to use Jest with React Native)如何使用酶作爲反應天然與笑話
但我不斷收到許多警告,(我有多個組併發測試)每當我試圖渲染(不安裝,它崩潰)的任何天然成分。警告總是關於一個本地道具不被認可。
Warning: Unknown props `focus`, `secureTextEntry` on <TextInput> tag. Remove these props from the element.
in TextInput (created by TextInput)
in TextInput (created by PasswordInput)
任何人誰設置了工作,承認如何刪除警告或如何解決它?
謝謝
您是否在自己的組件中渲染了?看起來你正在傳遞一些無法識別的道具。 你可以添加組件的實現以及測試嗎? 我可以使用更多的上下文來幫助你;) –
guitoof