Commit 7959d46a authored by Constance Okoghenun's avatar Constance Okoghenun

Fixed typo, updated test, and removed commented code

parent 36a301a3
......@@ -72,7 +72,6 @@ export default class Diff {
const view = file.data('view');
const params = { since, to, bottom, offset, unfold, view };
// $.get(link, params, response => $target.parent().replaceWith(response));
axios.get(link, { params })
.then(({ data }) => $target.parent().replaceWith(data))
.catch(() => flash(__('An error occurred while loading diff')));
......
......@@ -16,6 +16,6 @@ export default class GpgBadges {
badges.filter(`[data-commit-sha="${signature.commit_sha}"]`).replaceWith(signature.html);
});
})
.catch(() => flash(__('An error occurred while loading comm')));
.catch(() => flash(__('An error occurred while loading commits')));
}
}
......@@ -40,7 +40,7 @@ describe('GpgBadges', () => {
const spinners = document.querySelectorAll('.js-loading-gpg-badge i.fa.fa-spinner.fa-spin');
expect(spinners.length).toBe(1);
done();
}).catch(err => done(err));
}).catch(done.fail);
});
it('replaces the loading spinner', (done) => {
......@@ -51,6 +51,6 @@ describe('GpgBadges', () => {
const parentContainer = document.querySelector('.parent-container');
expect(parentContainer.innerHTML.trim()).toEqual(dummyBadgeHtml);
done();
}).catch(err => done(err));
}).catch(done.fail);
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment