Skip to content

Commit

Permalink
1.0.0 - fix spec to pull in correct method to handle Nil rejection
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanCannon committed Oct 1, 2015
1 parent 12e1028 commit 4b4b7d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name" : "alien-node-q-utils",
"version" : "0.0.6",
"version" : "1.0.0",
"description" : "Helper functions for promises with Q on NodeJS",
"main" : "lib/Promises.js",
"dependencies" : {
Expand Down
6 changes: 3 additions & 3 deletions spec/rejectOnErrorOrNilElseResolveSpec.js
Expand Up @@ -3,7 +3,7 @@
var R = require('ramda'),
Q = require('q');

var rejectOnErrorOrResolve = require('../lib/methods/rejectOnErrorOrResolve');
var rejectOnErrorOrResolve = require('../lib/methods/rejectOnErrorOrNilElseResolve');

var mockPromiseNoError = function(resolveWith) {
var deferred = Q.defer();
Expand Down Expand Up @@ -31,14 +31,14 @@ describe('rejectOnErrorOrResolve', function() {
});
});

it('should reject a promise when resolveWith is null [Nil]', function() {
it('should reject a promise when resolveWith is null [Nil]', function(done) {
mockPromiseNoError(FAKE_RESOLVE_WITH_NULL).catch(function(err) {
expect(err).toBe(undefined);
done();
})
});

it('should reject a promise when resolveWith is undefined [Nil]', function() {
it('should reject a promise when resolveWith is undefined [Nil]', function(done) {
mockPromiseNoError(FAKE_RESOLVE_WITH_UNDEFINED).catch(function(err) {
expect(err).toBe(undefined);
done();
Expand Down

0 comments on commit 4b4b7d4

Please sign in to comment.