Improve visualize modal test coverage (#2811)

add unit tests for VisualizeModal component
This commit is contained in:
Grace Guo
2017-05-30 18:16:22 -07:00
committed by GitHub
parent 3c89c8cc46
commit 1e7773eb16
5 changed files with 247 additions and 31 deletions

View File

@@ -23,7 +23,7 @@ describe('reducers', () => {
describe('runQuery', () => {
it('should handle query timeout', () => {
const dispatch = sinon.spy();
const urlStub = sinon.stub(exploreUtils, 'getExploreUrl', () => ('mockURL'));
const urlStub = sinon.stub(exploreUtils, 'getExploreUrl').callsFake(() => ('mockURL'));
const ajaxStub = sinon.stub($, 'ajax');
ajaxStub.yieldsTo('error', { statusText: 'timeout' });