react-native/Libraries/WebSocket/__mocks__/event-target-shim.js
Eli White d01ab66b47 Prettier React Native Libraries
Reviewed By: sahrens

Differential Revision: D7961488

fbshipit-source-id: 05f9b8b0b91ae77f9040a5321ccc18f7c3c1ce9a
2018-05-10 19:10:38 -07:00

21 lines
444 B
JavaScript

/** @format */
// Jest fatals for the following statement (minimal repro case)
//
// exports.something = Symbol;
//
// Until it is fixed, mocking the entire node module makes the
// problem go away.
'use strict';
function EventTarget() {
// Support both EventTarget and EventTarget(...)
// as a super class, just like the original module does.
if (arguments.length > 0) {
return EventTarget;
}
}
module.exports = EventTarget;