Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Sep 30, 2018
1 parent aea4dd6 commit 6cbac49
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test/unit.test.js
Expand Up @@ -108,11 +108,15 @@ describe('connectMongoDBSession', function() {
};

var SessionStore = connectMongoDBSession({ Store: StoreStub });
assert.throws(
function() {
new SessionStore();
},
/^Error connecting to db: Cant connect$/);

var threw = false;
try {
new SessionStore();
} catch (error) {
threw = true;
assert.equal(error.message, 'Error connecting to db: Cant connect');
}

done();
});

Expand Down

0 comments on commit 6cbac49

Please sign in to comment.