forked from facebook/react
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathall.js
More file actions
31 lines (27 loc) · 850 Bytes
/
all.js
File metadata and controls
31 lines (27 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// This file exists both to give a single entry point for all the utility
// modules in src/test and to specify an ordering on those modules, since
// some still have implicit dependencies on others.
require("./phantomjs-shims");
require("ReactTestUtils");
require("reactComponentExpect");
require("mocks");
require("mock-modules");
require("./mock-timers");
exports.enableTest = function(testID) {
describe(testID, function() {
beforeEach(function() {
require("mock-modules").setMockMap(mockMap);
});
require("mock-modules").clearMockMap();
require("../" + testID);
var mockMap = require("mock-modules").getMockMap();
});
};
exports.removeNextSiblings = function(node) {
var parent = node && node.parentNode;
if (parent) {
while (node.nextSibling) {
parent.removeChild(node.nextSibling);
}
}
};