Skip to content

Commit

Permalink
✅ Increase coverage for setting.js
Browse files Browse the repository at this point in the history
  • Loading branch information
faival committed Mar 27, 2018
1 parent 81125a4 commit c477384
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/components/setting/setting.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,23 @@ describe('Setting', () => {
const t = key => key;
let wrapper;

const settingsUpdated = sinon.spy();
const accountUpdated = sinon.spy();
let settingsUpdated;
let accountUpdated;

beforeEach(() => {
settingsUpdated = sinon.spy();
accountUpdated = sinon.spy();
const props = {
settingsUpdated,
accountUpdated,
settings,
t,
};

wrapper = mount(
<Setting store={store}
settingsUpdated={settingsUpdated}
accountUpdated={accountUpdated}
settings={settings} t={t}/>, options);
<Setting
store={store}
{...props}/>, options);

clock = sinon.useFakeTimers({
toFake: ['setTimeout', 'clearTimeout', 'Date', 'setInterval'],
Expand Down

0 comments on commit c477384

Please sign in to comment.