Commit 9eaa6d94 authored by tyabonil's avatar tyabonil
Browse files

Merge pull request #1 from floatdrop/master

Dependencies bump and some tests
parents d3c4b4b3 121f6a7e
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
  "description": "Promise-based Wrapper for XHR using Request and Bluebird",
  "main": "./lib/rp.js",
  "scripts": {
    "test": "To Do"
    "test": "istanbul test _mocha --report html -- test/*-test*.js -R spec"
  },
  "repository": {
    "type": "git",
@@ -19,7 +19,11 @@
  "author": "Ty Abonil",
  "license": "MIT",
  "dependencies": {
    "bluebird": "~0.7.9-1",
    "request": "~2.27.0"
    "bluebird": "~1.0.1",
    "request": "~2.33.0"
  },
  "devDependencies": {
    "mocha": "~1.17.1",
    "istanbul": "~0.2.4"
  }
}

test/request-test.js

0 → 100644
+17 −0
Original line number Diff line number Diff line
var rp = require('../lib/rp.js');

describe('request tests', function () {

    it('should request google.com', function (done) {
        rp('http://www.google.com')
		    .then(done.bind(null, null))
		    .catch(done);
    });

    it('should catch errors', function (done) {
        rp('http://googl')
		    .then(done.bind(null, 'then callback was called'))
		    .catch(done.bind(null, null));
    });

});
 No newline at end of file