Skip to content

Commit

Permalink
Added a couple more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed Apr 28, 2015
1 parent da8a2d9 commit cb4700e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"main": "./index",
"scripts": {
"test": "npm run coverage",
"test:watch": "mocha -w",
"test:watch": "mocha -w",
"coverage": "istanbul cover node_modules/mocha/bin/_mocha -- -R spec --ui bdd",
"lint": "jshint lib/",
"benchmark": "node ./benchmarks/mongodb.js"
Expand All @@ -27,20 +27,20 @@
"node": ">= 0.8"
},
"dependencies": {
"bluebird": "^2.9.24",
"bluebird": "^2.9.25",
"lodash": "^3.7.0",
"mongodb": "^2.0.28",
"skmatc": "^1.1.2"
},
"devDependencies": {
"mocha": "2.x",
"mocha": "^2.2.4",
"chai": "^2.2.0",
"chai-as-promised": "^5.0.0",
"chai-fuzzy": "^1.5.0",
"underscore": "^1.8.3",
"tick": "~0.1.1",
"istanbul": "~0.3.13",
"coveralls": "^2.11.2",
"tick": "~0.1.1",
"istanbul": "~0.3.13",
"coveralls": "^2.11.2",
"codeclimate-test-reporter": "~0.0.4",
"jshint": "^2.7.0"
},
Expand Down
4 changes: 4 additions & 0 deletions test/Model.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/Model.js.map

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions test/Model.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference path="../_references.d.ts" />
import Iridium = require('../index');
import MongoDB = require('mongodb');
import Cursor = require('../lib/Cursor');
import Promise = require('bluebird');

Expand Down Expand Up @@ -120,6 +121,10 @@ describe("Model",() => {
var model = new Iridium.Model(new Iridium.Core('mongodb://localhost/test'),() => { }, 'test', { _id: false });
chai.expect(() => model.collection).to.throw("Iridium Core not connected to a database.");
});

it("should return a MongoDB DB object",() => {
chai.expect(core.connection).to.exist.and.be.an.instanceof(MongoDB.Db);
});
});

describe("create()",() => {
Expand Down

0 comments on commit cb4700e

Please sign in to comment.