Created
December 16, 2016 17:45
-
-
Save neurosnap/6e85a5f94836ee0c300c5f2e0792d17d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('getFolderCount', () => { | |
const getFolderCount = selectors.getFolderCount; | |
before(() => { | |
sinon.stub(selectors, 'getDisplayFolderProp'); | |
sinon.stub(selectors, 'getFoldersHash'); | |
sinon.stub(selectors, 'calcFolderCount'); | |
sinon.stub(coreSelectors, 'getMailboxes'); | |
sinon.stub(coreSelectors, 'getThreadIdsByFolder'); | |
getFolderCount({}, {}); | |
}); | |
after(() => { | |
selectors.getDisplayFolderProp.restore(); | |
selectors.calcFolderCount.restore(); | |
selectors.getFoldersHash.restore(); | |
coreSelectors.getMailboxes.restore(); | |
coreSelectors.getThreadIdsByFolder.restore(); | |
}); | |
it('should call getDisplayFolderProp', () => { | |
expect(selectors.getDisplayFolderProp).to.have.been.called(); | |
}); | |
it('should call calcFolderCount', () => { | |
expect(selectors.calcFolderCount).to.have.been.called(); | |
}); | |
it('should call getFoldersHash', () => { | |
expect(selectors.getFoldersHash).to.have.been.called(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment