[testing] dump the cache when depending on warning messages
It's possible to configure Jest to not dump the module cache between specs. This makes it tricky when we silence warnings one a 2nd call. In this case, the same message was getting logged so when we expected the count of warning calls to increment, it didn't.
Paul O’Shannessy committed
Jan 27, 2015 at 16:00 UTC
dbdeb078ceffcf49a4a4fd62cf04570e8f2681d4
1 file changed
+1
src/browser/ui/dom/components/__tests__/ReactDOMInput-test.js
+1
@@ -22,6 +22,7 @@ describe('ReactDOMInput', function() {
22
var ReactTestUtils;
23
24
beforeEach(function() {
25
+ require('mock-modules').dumpCache();
26
React = require('React');
27
ReactLink = require('ReactLink');
28
ReactTestUtils = require('ReactTestUtils');