mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
fix more tests
This commit is contained in:
@@ -76,13 +76,8 @@ describe('Treatment API', function ( ) {
|
||||
|
||||
self.ctx.bus.on('data-loaded', function dataWasLoaded ( ) {
|
||||
self.ctx.ddata.treatments.length.should.equal(3);
|
||||
self.ctx.ddata.treatments[0].mgdl.should.equal(100);
|
||||
should.not.exist(self.ctx.ddata.treatments[0].eventTime);
|
||||
should.not.exist(self.ctx.ddata.treatments[0].notes);
|
||||
|
||||
should.not.exist(self.ctx.ddata.treatments[1].eventTime);
|
||||
self.ctx.ddata.treatments[1].insulin.should.equal(2);
|
||||
self.ctx.ddata.treatments[2].carbs.should.equal(30);
|
||||
|
||||
//if travis is slow the 2 posts take long enough that 2 data-loaded events are emitted
|
||||
if (!doneCalled) { done(); }
|
||||
|
||||
@@ -6,11 +6,8 @@ var benv = require('benv');
|
||||
var read = require('fs').readFileSync;
|
||||
var serverSettings = require('./fixtures/default-server-settings');
|
||||
|
||||
var nowData = {
|
||||
sgvs: [
|
||||
{ mgdl: 100, mills: Date.now(), direction: 'Flat', type: 'sgv' }
|
||||
]
|
||||
};
|
||||
var nowData = require('../lib/data/ddata')();
|
||||
nowData.sgvs.push({ mgdl: 100, mills: Date.now(), direction: 'Flat', type: 'sgv' });
|
||||
|
||||
var exampleProfile = {
|
||||
defaultProfile : 'Default'
|
||||
|
||||
Reference in New Issue
Block a user