diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-01 12:12:10 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-01 12:12:10 +0000 |
commit | 9c5341dd0832c3af377191c461c800e1aa048b10 (patch) | |
tree | e1343570ed06960c320200c8a35f2675a6ec2b48 /spec/frontend/lib/utils/rails_ujs_spec.js | |
parent | 46f35a616740504125aaf2c7d20a8bc7ff755ec1 (diff) | |
download | gitlab-ce-9c5341dd0832c3af377191c461c800e1aa048b10.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/lib/utils/rails_ujs_spec.js')
-rw-r--r-- | spec/frontend/lib/utils/rails_ujs_spec.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/spec/frontend/lib/utils/rails_ujs_spec.js b/spec/frontend/lib/utils/rails_ujs_spec.js index c10301523c9..da9cc5c6f3c 100644 --- a/spec/frontend/lib/utils/rails_ujs_spec.js +++ b/spec/frontend/lib/utils/rails_ujs_spec.js @@ -18,14 +18,12 @@ function mockXHRResponse({ responseText, responseContentType } = {}) { .mockReturnValue(responseContentType); jest.spyOn(global.XMLHttpRequest.prototype, 'send').mockImplementation(function send() { - requestAnimationFrame(() => { - Object.defineProperties(this, { - readyState: { value: XMLHttpRequest.DONE }, - status: { value: 200 }, - response: { value: responseText }, - }); - this.onreadystatechange(); + Object.defineProperties(this, { + readyState: { value: XMLHttpRequest.DONE }, + status: { value: 200 }, + response: { value: responseText }, }); + this.onreadystatechange(); }); } |