Skip to content
Snippets Groups Projects
Commit 3fe0ffff authored by Illya Klymov's avatar Illya Klymov
Browse files

Fix missing setTimeout in spec

parent 1a9cc19a
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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', () => {
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment