Skip to content

Conversation

@jimfb
Copy link
Contributor

@jimfb jimfb commented Jan 6, 2015

Added jasmine matcher that expects calls to console.warn.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use spyOn(console, 'warn') (andCallThrough maybe), not the mocks module. That gets rid of the try/finally because we don't need to reset console.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't spy twice, so as per discussion, using mocks.

@zpao
Copy link
Member

zpao commented Jan 7, 2015

Let's do it.

jimfb added a commit that referenced this pull request Jan 7, 2015
Added jasmine matcher that expects calls to console.warn.
@jimfb jimfb merged commit 9514861 into facebook:master Jan 7, 2015
@jimfb jimfb deleted the testutils-consolemock branch January 7, 2015 21:11
zpao added a commit to zpao/react that referenced this pull request Jan 15, 2015
…ock"

This reverts commit 9514861, reversing
changes made to cdec837.
zpao added a commit that referenced this pull request Jan 15, 2015
Revert "Merge pull request #2814 from jsfb/testutils-consolemock"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants