Fixed typo, updated test, and removed commented code
This commit is contained in:
parent
36a301a3c9
commit
7959d46a89
3 changed files with 3 additions and 4 deletions
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue