From 201d03268eba263684a756f1f114ec8e8a2ecc35 Mon Sep 17 00:00:00 2001 From: Nuno Campos Date: Fri, 13 May 2016 08:24:25 +0100 Subject: [PATCH] changed test --- src/isomorphic/__tests__/ReactPerf-test.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/isomorphic/__tests__/ReactPerf-test.js b/src/isomorphic/__tests__/ReactPerf-test.js index 81e5131855282..fd727672741b3 100644 --- a/src/isomorphic/__tests__/ReactPerf-test.js +++ b/src/isomorphic/__tests__/ReactPerf-test.js @@ -16,7 +16,6 @@ describe('ReactPerf', function() { var ReactDOM; var ReactPerf; var ReactTestUtils; - var ReactDebugTool; var App; var Box; @@ -37,7 +36,6 @@ describe('ReactPerf', function() { ReactDOM = require('ReactDOM'); ReactPerf = require('ReactPerf'); ReactTestUtils = require('ReactTestUtils'); - ReactDebugTool = require('ReactDebugTool'); App = React.createClass({ render: function() { @@ -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); }); });