-
Notifications
You must be signed in to change notification settings - Fork 47.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added isProfiling() to ReactDebugTool and isRunning() to PerfTools #6763
Conversation
should I add |
the build timed out for some reason, not really sure why |
@@ -283,4 +285,12 @@ describe('ReactPerf', function() { | |||
ReactPerf.printDOM(measurements); | |||
expect(console.error.calls.length).toBe(1); | |||
}); | |||
|
|||
it('returns isRunning state', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to test this by running start()
and stop()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed it
@nfcampos updated the pull request. |
Let’s add extra tests that verify that running |
separate tests right? because they're testing |
Yeah. I’d probably just test the public API here ( |
@gaearon I've added those two tests to |
@nfcampos updated the pull request. |
Thanks! |
added isProfiling() to ReactDebugTool and isRunning() to PerfTools (cherry picked from commit 5569d1d)
added isProfiling() to ReactDebugTool and isRunning() to PerfTools (cherry picked from commit 5569d1d)
I'm not sure the tests are added are worth it,
closes #6762