Skip to content
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.

Commit

Permalink
Increased coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
pluma committed Jan 14, 2014
1 parent ca3c067 commit 86455c3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions Makefile
@@ -1,9 +1,15 @@
coveralls:
@rm -rf ./coverage
@./node_modules/.bin/istanbul cover -x "**/spec/**" \
./node_modules/mocha/bin/_mocha --report lcovonly spec/ -- -R spec && \
cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
@rm -rf ./coverage

cover:
@rm -rf ./coverage
@./node_modules/.bin/istanbul cover -x "**/spec/**" \
./node_modules/mocha/bin/_mocha --report lcov spec/ -- -R spec

test: lint
@./node_modules/.bin/mocha \
--growl \
Expand Down
2 changes: 1 addition & 1 deletion index.js
@@ -1,4 +1,4 @@
/*! revalidator-model 0.2.2 Original author Alan Plum <me@pluma.io>. Released into the Public Domain under the UNLICENSE. @preserve */
/*! revalidator-model 0.2.3 Original author Alan Plum <me@pluma.io>. Released into the Public Domain under the UNLICENSE. @preserve */
var revalidator = require('revalidator'),
filterObj = require('object-filter'),
transform = require('transform-object'),
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "revalidator-model",
"version": "0.2.2",
"version": "0.2.3",
"author": "Alan Plum <me@pluma.io>",
"description": "Simple validatable models with revalidator.",
"licenses": {
Expand Down
8 changes: 4 additions & 4 deletions spec/model.spec.js
Expand Up @@ -7,7 +7,7 @@ describe('model(schema)', function() {
expect(model).to.be.a('function');
});
it('returns a Model constructor', function() {
var Ctor = model({});
var Ctor = model();
expect(Ctor).to.be.a('function');
expect(Ctor).to.have.property('prototype');
expect(Ctor.prototype).to.be.an('object');
Expand All @@ -27,13 +27,13 @@ describe('model(schema)', function() {

describe('Model.hydrate(data)', function() {
it('is a method', function() {
var Model = model({});
var Model = model();
expect(Model).to.have.property('hydrate');
expect(Model.hydrate).to.be.a('function');
});
it('returns a Model instance', function() {
var Model = model({});
var obj = Model.hydrate({});
var Model = model();
var obj = Model.hydrate();
expect(obj).to.be.a(Model);
expect(Object.getPrototypeOf(obj)).to.equal(Model.prototype);
});
Expand Down

0 comments on commit 86455c3

Please sign in to comment.