Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
81152 views
1
// This file exists both to give a single entry point for all the utility
2
// modules in src/test and to specify an ordering on those modules, since
3
// some still have implicit dependencies on others.
4
5
require("./phantomjs-shims");
6
require("ReactTestUtils");
7
require("reactComponentExpect");
8
require("mocks");
9
require("mock-modules");
10
require("./mock-timers");
11
12
exports.enableTest = function(testID) {
13
describe(testID, function() {
14
beforeEach(function() {
15
require("mock-modules").setMockMap(mockMap);
16
});
17
18
require("mock-modules").clearMockMap();
19
require("../" + testID);
20
var mockMap = require("mock-modules").getMockMap();
21
});
22
};
23
24
exports.removeNextSiblings = function(node) {
25
var parent = node && node.parentNode;
26
if (parent) {
27
while (node.nextSibling) {
28
parent.removeChild(node.nextSibling);
29
}
30
}
31
};
32
33