From 137322543c18567ae5f84f6716762620f480f460 Mon Sep 17 00:00:00 2001 From: Robin North Date: Wed, 24 Jan 2018 23:20:36 +0000 Subject: [PATCH] Explicitly flag if aborting a request fails due to request completing --- tests/lib/abort-request.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/lib/abort-request.js b/tests/lib/abort-request.js index edaa774..8fa257a 100644 --- a/tests/lib/abort-request.js +++ b/tests/lib/abort-request.js @@ -23,7 +23,9 @@ tape("test aborting xhr request", function(t) { }) t.test("- pending request is aborted", function(t) { - var r = requestCacheBust("https://httpbin.org/delay/10", {}, function() {}) + var r = requestCacheBust("https://httpbin.org/delay/10", {}, function() { + t.fail("xhr was not aborted") + }) t.equal(r.readyState, 1, "xhr readyState is '1' (SENT)") abortRequest(r) t.equal(r.readyState, 0, "xhr readyState is '0' (ABORTED)")