diff options
author | Tayane Fernandes <tayane.rmf@gmail.com> | 2017-03-15 14:34:09 -0300 |
---|---|---|
committer | Tayane Fernandes <tayane.rmf@gmail.com> | 2017-03-16 10:28:44 -0300 |
commit | 30f450e4fe20ac0b2d8751bb3f940566aefd394f (patch) | |
tree | 88ff5c9bcb61042f05842bc8003b39b6fa0884a7 | |
parent | 54c6c6b7c932ea7fe600592a861f7b46391b494d (diff) |
[#971] Remove sinon and use expect to spy functions
with @tuliocasagrande
-rw-r--r-- | web-ui/package.json | 1 | ||||
-rw-r--r-- | web-ui/src/backup_account/backup_email/backup_email.spec.js | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/web-ui/package.json b/web-ui/package.json index efb026ad..5a5375e6 100644 --- a/web-ui/package.json +++ b/web-ui/package.json @@ -72,7 +72,6 @@ "react-tap-event-plugin": "^2.0.1", "requirejs": "2.2.0", "sass-loader": "^4.1.1", - "sinon": "^2.0.0", "style-loader": "^0.13.1", "typeahead.js": "^0.11.1", "url-loader": "^0.5.7", diff --git a/web-ui/src/backup_account/backup_email/backup_email.spec.js b/web-ui/src/backup_account/backup_email/backup_email.spec.js index d6e3e4e7..8732003b 100644 --- a/web-ui/src/backup_account/backup_email/backup_email.spec.js +++ b/web-ui/src/backup_account/backup_email/backup_email.spec.js @@ -1,6 +1,5 @@ import { shallow } from 'enzyme'; import expect from 'expect'; -import sinon from 'sinon'; import React from 'react'; import { BackupEmail } from 'src/backup_account/backup_email/backup_email'; @@ -26,12 +25,12 @@ describe('BackupEmail', () => { }); it('form submit should call parameter custom submit', () => { - const mockOnSubmit = sinon.spy(); + const mockOnSubmit = expect.createSpy(); const event = { preventDefault() {} }; page = shallow(<BackupEmail t={mockTranslations} onSubmit={mockOnSubmit} />); page.instance().submitHandler(event); - sinon.assert.calledOnce(mockOnSubmit); + expect(mockOnSubmit).toHaveBeenCalled(); }); describe('Email validation', () => { |