summaryrefslogtreecommitdiff
path: root/spec/frontend/merge_request_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/merge_request_spec.js')
-rw-r--r--spec/frontend/merge_request_spec.js18
1 files changed, 6 insertions, 12 deletions
diff --git a/spec/frontend/merge_request_spec.js b/spec/frontend/merge_request_spec.js
index 1cb7206b97f..5624043260a 100644
--- a/spec/frontend/merge_request_spec.js
+++ b/spec/frontend/merge_request_spec.js
@@ -28,14 +28,11 @@ describe('MergeRequest', () => {
mock.restore();
});
- it('modifies the Markdown field', done => {
+ it('modifies the Markdown field', (done) => {
jest.spyOn($, 'ajax').mockImplementation();
const changeEvent = document.createEvent('HTMLEvents');
changeEvent.initEvent('change', true, true);
- $('input[type=checkbox]')
- .first()
- .attr('checked', true)[0]
- .dispatchEvent(changeEvent);
+ $('input[type=checkbox]').first().attr('checked', true)[0].dispatchEvent(changeEvent);
setImmediate(() => {
expect($('.js-task-list-field').val()).toBe(
'- [x] Task List Item\n- [ ]\n- [ ] Task List Item 2\n',
@@ -44,15 +41,12 @@ describe('MergeRequest', () => {
});
});
- it('ensure that task with only spaces does not get checked incorrectly', done => {
+ it('ensure that task with only spaces does not get checked incorrectly', (done) => {
// fixed in 'deckar01-task_list', '2.2.1' gem
jest.spyOn($, 'ajax').mockImplementation();
const changeEvent = document.createEvent('HTMLEvents');
changeEvent.initEvent('change', true, true);
- $('input[type=checkbox]')
- .last()
- .attr('checked', true)[0]
- .dispatchEvent(changeEvent);
+ $('input[type=checkbox]').last().attr('checked', true)[0].dispatchEvent(changeEvent);
setImmediate(() => {
expect($('.js-task-list-field').val()).toBe(
'- [ ] Task List Item\n- [ ]\n- [x] Task List Item 2\n',
@@ -67,7 +61,7 @@ describe('MergeRequest', () => {
const index = 3;
const checked = true;
- it('submits an ajax request on tasklist:changed', done => {
+ it('submits an ajax request on tasklist:changed', (done) => {
$('.js-task-list-field').trigger({
type: 'tasklist:changed',
detail: { lineNumber, lineSource, index, checked },
@@ -89,7 +83,7 @@ describe('MergeRequest', () => {
});
});
- it('shows an error notification when tasklist update failed', done => {
+ it('shows an error notification when tasklist update failed', (done) => {
mock
.onPatch(`${TEST_HOST}/frontend-fixtures/merge-requests-project/-/merge_requests/1.json`)
.reply(409, {});