From e90988f249b5b618d3a4d7b8955ee11724ffd417 Mon Sep 17 00:00:00 2001 From: hefangshi Date: Mon, 21 Mar 2016 18:34:27 +0800 Subject: [PATCH] remove deps of promise in url test --- test/ral.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/ral.js b/test/ral.js index a6bcff8..4d6d5ba 100644 --- a/test/ral.js +++ b/test/ral.js @@ -683,15 +683,15 @@ describe('ral', function () { before(function (ok) { isInited.on('done', ok); }); - ralP('GET_QS_SERV', { + ral('GET_QS_SERV', { url: 'https://www.baidu.com/search/error.html', unpack: 'string', timeout: 5000, rejectUnauthorized: false - }).then(function (data) { + }).on('data', function (data) { data.should.match(/STATUS OK/); done(); - }).catch(function (err) { + }).on('error', function (err) { should.not.exist(err); done(); }); @@ -701,15 +701,15 @@ describe('ral', function () { before(function (ok) { isInited.on('done', ok); }); - ralP('GET_QS_SERV', { + ral('GET_QS_SERV', { url: 'http://www.baidu.com/search/error.html', unpack: 'string', timeout: 5000, rejectUnauthorized: false - }).then(function (data) { + }).on('data', function (data) { data.should.match(/STATUS OK/); done(); - }).catch(function (err) { + }).on('error', function (err) { should.not.exist(err); done(); });