replace expect.createSpy() with jest.fn()

Signed-off-by: Stephen Solka <stephen0q@gmail.com>
This commit is contained in:
Stephen Solka 2018-12-24 21:55:10 -05:00 committed by J. Ryan Stinnett
parent c3185a4cdb
commit 0bb35944f9
5 changed files with 25 additions and 21 deletions

View file

@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
const jest = require('jest-mock');
const React = require('react');
const ReactDOM = require('react-dom');
const ReactTestUtils = require('react-addons-test-utils');
@ -87,8 +88,8 @@ describe('Registration', function() {
});
it('should NOT track a referral following successful registration of a non-team member', function(done) {
const onLoggedIn = expect.createSpy().andCall(function(creds, teamToken) {
expect(teamToken).toNotExist();
const onLoggedIn = jest.fn(function(creds, teamToken) {
expect(teamToken).toBeFalsy();
done();
});