Skip to content

Commit

Permalink
Fix tests related to event-target-shim
Browse files Browse the repository at this point in the history
Summary: @​public

Jest has an issue where if you export `Symbol` it crashes badly. Since event-target-shim does that, it breaks everything. Mocking that module fixes the issue until @cpojer comes back from vacation and fixes the bug in Jest itself.

Reviewed By: @jingc

Differential Revision: D2503562
  • Loading branch information
vjeux authored and facebook-github-bot-6 committed Oct 2, 2015
1 parent b8c42f7 commit 6f84ccf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Libraries/WebSocket/__mocks__/event-target-shim.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// 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';
module.exports = function() {};

0 comments on commit 6f84ccf

Please sign in to comment.