Skip to content

Commit

Permalink
fix EventEmitter undefined on React Native 0.64 (#1351)
Browse files Browse the repository at this point in the history
* fix EventEmitter undefined on React Native 0.64

* fix bug on react-native-test.js
  • Loading branch information
bduyng committed Apr 21, 2021
1 parent d71eb33 commit 7512f53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/EventEmitter.js
Expand Up @@ -10,7 +10,7 @@
*/

if (process.env.PARSE_BUILD === 'react-native') {
const EventEmitter = require('../../../react-native/Libraries/vendor/emitter/EventEmitter');
const EventEmitter = require('../../../react-native/Libraries/vendor/emitter/_EventEmitter');
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
module.exports = EventEmitter;
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/react-native-test.js
Expand Up @@ -10,7 +10,7 @@ jest.dontMock('../ParseObject');
jest.dontMock('../Storage');

jest.mock(
'../../../../react-native/Libraries/vendor/emitter/EventEmitter',
'../../../../react-native/Libraries/vendor/emitter/_EventEmitter',
() => {
return {
prototype: {
Expand All @@ -21,7 +21,7 @@ jest.mock(
{ virtual: true }
);

const mockEmitter = require('../../../../react-native/Libraries/vendor/emitter/EventEmitter');
const mockEmitter = require('../../../../react-native/Libraries/vendor/emitter/_EventEmitter');
const CoreManager = require('../CoreManager');

describe('React Native', () => {
Expand Down

0 comments on commit 7512f53

Please sign in to comment.