mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-18 05:30:21 -04:00
Update tests to use most recent jest and supporting libraries
This commit is contained in:
@@ -80,23 +80,25 @@
|
||||
|
||||
let startTime = Date.now();
|
||||
|
||||
if (document.visibilityState !== "hidden" && queue.push(renderer) === 1) $.ajax(
|
||||
resource,
|
||||
{
|
||||
'method': form ? 'post' : 'get',
|
||||
'data': form ? $('#' + form).serialize() : {}
|
||||
}
|
||||
).done(
|
||||
response => {
|
||||
flushQueue(queue, response);
|
||||
if (response.stop === 1) {
|
||||
poll = function(){};
|
||||
if (document.visibilityState !== "hidden" && queue.push(renderer) === 1) {
|
||||
$.ajax(
|
||||
resource,
|
||||
{
|
||||
'method': form ? 'post' : 'get',
|
||||
'data': form ? $('#' + form).serialize() : {}
|
||||
}
|
||||
interval = calculateBackoff(Date.now() - startTime);
|
||||
}
|
||||
).fail(
|
||||
() => poll = function(){}
|
||||
);
|
||||
).done(
|
||||
response => {
|
||||
flushQueue(queue, response);
|
||||
if (response.stop === 1) {
|
||||
poll = function(){};
|
||||
}
|
||||
interval = calculateBackoff(Date.now() - startTime);
|
||||
}
|
||||
).fail(
|
||||
() => poll = function(){}
|
||||
);
|
||||
}
|
||||
|
||||
setTimeout(
|
||||
() => poll.apply(window, arguments), interval
|
||||
|
||||
Reference in New Issue
Block a user