Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a little iob test clean up #28

Merged
merged 1 commit into from
Nov 18, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions tests/iob.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ describe('IOB', function ( ) {
hourLater.bolusiob.should.be.lessThan(.5);
hourLater.iob.should.be.greaterThan(0);

var after3hDIAInputs = inputs;
after3hDIAInputs.clock = new Date(now + (3 * 60 * 60 * 1000)).toISOString();
var after3hDIA = require('../lib/iob')(after3hDIAInputs);
after3hDIA.iob.should.greaterThan(0);

var after4hDIAInputs = inputs;
after4hDIAInputs.clock = new Date(now + (4 * 60 * 60 * 1000)).toISOString();
var after4hDIA = require('../lib/iob')(after4hDIAInputs);
after4hDIA.iob.should.equal(0);
var after3hInputs = inputs;
after3hInputs.clock = new Date(now + (3 * 60 * 60 * 1000)).toISOString();
var after3h = require('../lib/iob')(after3hInputs);
after3h.iob.should.be.greaterThan(0);

var after4hInputs = inputs;
after4hInputs.clock = new Date(now + (4 * 60 * 60 * 1000)).toISOString();
var after4h = require('../lib/iob')(after4hInputs);
after4h.iob.should.equal(0);

});

Expand Down