You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running React v0.13.3 and testing with jasmine-core v2.3.4.
When testing my component validation, I use jasmine's spyOn method to mock out console.warn and check that TestUtils.renderIntoDocument will trigger a warning with the correct message when validation fails. I use expect(console.warn).toHaveBeenCalledWith(...) to check that validation is working.
I run the same unit test, in two separate test suites (tests/fileA.js and tests/fileB.js) that expects the warning to occur. Because React globally tracks which warnings have been triggered (to avoid spamming the console it seems) it doesn't send the warning the second time, and thus fails.
I would expect that TestUtils.renderIntoDocument would setup isolation for each render so that warnings can be checked properly.
The text was updated successfully, but these errors were encountered:
I'm running React v0.13.3 and testing with jasmine-core v2.3.4.
When testing my component validation, I use jasmine's
spyOn
method to mock outconsole.warn
and check thatTestUtils.renderIntoDocument
will trigger a warning with the correct message when validation fails. I useexpect(console.warn).toHaveBeenCalledWith(...)
to check that validation is working.I run the same unit test, in two separate test suites (
tests/fileA.js
andtests/fileB.js
) that expects the warning to occur. Because React globally tracks which warnings have been triggered (to avoid spamming the console it seems) it doesn't send the warning the second time, and thus fails.I would expect that
TestUtils.renderIntoDocument
would setup isolation for each render so that warnings can be checked properly.The text was updated successfully, but these errors were encountered: