Skip to content
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

Add back mocking removed to make ReactEventTopLevelCallback-test pass #586

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 4 additions & 9 deletions src/core/__tests__/ReactEventTopLevelCallback-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,23 @@ require('mock-modules')
.dontMock('ReactEventTopLevelCallback')
.dontMock('ReactMount')
.dontMock('ReactInstanceHandles')
.dontMock('ReactDOM');
.dontMock('ReactDOM')
.mock('ReactEventEmitter');

var EVENT_TARGET_PARAM = 1;

describe('ReactEventTopLevelCallback', function() {
var mocks;

var React;
var ReactEventTopLevelCallback;
var ReactDOM;
var ReactEventEmitter;
var ReactEventEmitter; // mocked

beforeEach(function() {
require('mock-modules').dumpCache();
mocks = require('mocks');

React = require('React');
ReactEventTopLevelCallback = require('ReactEventTopLevelCallback');
ReactDOM = require('ReactDOM');
ReactEventEmitter = require('ReactEventEmitter');

ReactEventEmitter.handleTopLevel = mocks.getMockFunction();
ReactEventEmitter = require('ReactEventEmitter'); // mocked
});

describe('Propagation', function() {
Expand Down