React Native: performance is not defined
Closed this issue · 3 comments
dbilgin commented
I wrote the exact same test with React Native components for render time in the example and all I'm getting is this:
ReferenceError: performance is not defined
at startMeasureRenderTime (node_modules/react-performance-testing/dist/index.cjs.js:75:23)
at Counter (node_modules/react-performance-testing/dist/index.cjs.js:175:44)
at renderWithHooks (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:5552:18)
at mountIndeterminateComponent (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:7918:13)
at beginWork (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:9019:16)
at performUnitOfWork (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:12649:12)
at workLoopSync (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:12622:22)
at performSyncWorkOnRoot (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:12333:9)
at node_modules/react-test-renderer/cjs/react-test-renderer.development.js:1825:24
at unstable_runWithPriority (node_modules/scheduler/cjs/scheduler.development.js:653:12)
keiya01 commented
@dbilgin
Thank you for sending the issue.
Could you send code sandbox or other actual implementation?
dbilgin commented
@keiya01 thanks for your answer
I tried creating a public repo for you from scratch, but I couldn't reproduce the exact same problem, instead I started having a different error: TypeError: [BABEL] /PerfTest/App.test.js: api.assumption is not a function
Here's the repo: https://github.com/dbilgin/PerfTest
dbilgin commented
The weird thing is, if I drop the render time and the test fails because of that, it works. It shows the error for the test and everything, but when it's supposed to pass, it failed.