[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.
This commit is contained in:
Paul O’Shannessy
2015-01-27 16:00:12 -08:00
parent 2ea1f51fe8
commit dbdeb078ce

View File

@@ -22,6 +22,7 @@ describe('ReactDOMInput', function() {
var ReactTestUtils;
beforeEach(function() {
require('mock-modules').dumpCache();
React = require('React');
ReactLink = require('ReactLink');
ReactTestUtils = require('ReactTestUtils');