fix(report): cap dimension scores and match zoom crops to thumbnails
This commit is contained in:
@@ -3,7 +3,7 @@ const assert = require('node:assert/strict');
|
||||
const Score = require('../js/skin-score');
|
||||
const dims = (firm, vita, stab) => ({ firm: { S: firm }, vita: { S: vita }, stab: { S: stab } });
|
||||
for (const [scores, total] of [
|
||||
[[8, 9, 8.5], 85], [[10, 10, 10], 100], [[7, 7, 7], 70],
|
||||
[[8, 9, 8.5], 85], [[10, 10, 10], 99], [[7, 7, 7], 70],
|
||||
[[10, 7, 7], 82], [[7, 10, 7], 79], [[7, 7, 10], 79],
|
||||
[[8.01, 8.82, 8], 83], [[7.69, 8.72, 9.1], 84]
|
||||
]) assert.equal(Score.weightedTotal(dims(...scores)), total, scores.join('/'));
|
||||
|
||||
Reference in New Issue
Block a user