From e284841db961d9886c0e0be596bcc81874e9b99a Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Sun, 26 Feb 2017 17:00:01 -0800 Subject: [PATCH] test: use fetch.Promise consistently On Node.js v4, Babel polyfills `Promise`. --- test/test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test.js b/test/test.js index eecd10f..7f6e755 100644 --- a/test/test.js +++ b/test/test.js @@ -55,13 +55,13 @@ describe('node-fetch', () => { it('should return a promise', function() { url = 'http://example.com/'; const p = fetch(url); - expect(p).to.be.an.instanceof(Promise); + expect(p).to.be.an.instanceof(fetch.Promise); expect(p).to.have.property('then'); }); it('should allow custom promise', function() { url = 'http://example.com/'; - const old = Promise; + const old = fetch.Promise; fetch.Promise = then; expect(fetch(url)).to.be.an.instanceof(then); expect(fetch(url)).to.not.be.an.instanceof(old);