solar-scores
Version:
Compute scores for solar decathlon competition - Cali 2015
20 lines (15 loc) • 528 B
JavaScript
;
var scores = require('..');
var d1 = [
{T: 5, epoch: new Date('2015-12-05 12:00:00 GMT-0500').getTime() }
];
describe('Refrigeration tests', function() {
it('Simple case', function() {
var freezing = new scores.Refrigeration({
doubleScoringParams: [0, 1, 4.5, 5.5]
});
var score = freezing.getScore(d1, 'T', new Date('2015-12-07 12:00:00 GMT-0500'));
score.perDay[0].fraction.should.equal(0.5);
score.max.should.approximately(8, 0.0001);
});
});