Skip to content

Commit

Permalink
changed test
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuno Campos committed May 13, 2016
1 parent a027d15 commit 201d032
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/isomorphic/__tests__/ReactPerf-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ describe('ReactPerf', function() {
var ReactDOM;
var ReactPerf;
var ReactTestUtils;
var ReactDebugTool;

var App;
var Box;
Expand All @@ -37,7 +36,6 @@ describe('ReactPerf', function() {
ReactDOM = require('ReactDOM');
ReactPerf = require('ReactPerf');
ReactTestUtils = require('ReactTestUtils');
ReactDebugTool = require('ReactDebugTool');

App = React.createClass({
render: function() {
Expand Down Expand Up @@ -287,10 +285,12 @@ describe('ReactPerf', function() {
});

it('returns isRunning state', () => {
spyOn(ReactDebugTool, 'isProfiling');
expect(ReactPerf.isRunning()).toBe(false);

ReactPerf.isRunning();
expect(ReactDebugTool.isProfiling.calls.length).toBe(1);
expect(ReactPerf.isRunning()).toBe(ReactDebugTool.isProfiling());
ReactPerf.start();
expect(ReactPerf.isRunning()).toBe(true);

ReactPerf.stop();
expect(ReactPerf.isRunning()).toBe(false);
});
});

0 comments on commit 201d032

Please sign in to comment.