From affb781dcd8072b86d43c7f64da0b04198ea1d8a Mon Sep 17 00:00:00 2001 From: David Graham Date: Mon, 13 Oct 2014 14:28:30 -0600 Subject: [PATCH] Test blob promise. --- test/test.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/test.js b/test/test.js index 5fc5f98..58ef05e 100644 --- a/test/test.js +++ b/test/test.js @@ -51,3 +51,13 @@ asyncTest('handles json parse error', 2, function() { start() }) }) + +asyncTest('resolves blob promise', 2, function() { + fetch('/hello').then(function(response) { + return response.blob() + }).then(function(blob) { + ok(blob instanceof Blob, 'blob is a Blob instance') + equal(blob.size, 2) + start() + }) +}) -- GitLab