diff options
Diffstat (limited to 'spec/javascripts/merge_request_spec.js')
-rw-r--r-- | spec/javascripts/merge_request_spec.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/javascripts/merge_request_spec.js b/spec/javascripts/merge_request_spec.js index cadcc15385f..72d6e832aca 100644 --- a/spec/javascripts/merge_request_spec.js +++ b/spec/javascripts/merge_request_spec.js @@ -29,15 +29,17 @@ describe('MergeRequest', function() { mock.restore(); }); - it('modifies the Markdown field', function() { + it('modifies the Markdown field', done => { spyOn($, 'ajax').and.stub(); const changeEvent = document.createEvent('HTMLEvents'); changeEvent.initEvent('change', true, true); $('input[type=checkbox]') .attr('checked', true)[0] .dispatchEvent(changeEvent); - - expect($('.js-task-list-field').val()).toBe('- [x] Task List Item'); + setTimeout(() => { + expect($('.js-task-list-field').val()).toBe('- [x] Task List Item'); + done(); + }); }); describe('tasklist', () => { |