Mostrar factores usados en cada estimación
This commit is contained in:
@@ -94,4 +94,11 @@ describe('survival scales', () => {
|
||||
expect(g.scales[0].risk?.low).toBeCloseTo(0.7);
|
||||
expect(g.scales[0].risk?.high).toBeCloseTo(0.9);
|
||||
});
|
||||
it('keeps the inputs attached to the estimate and leaves old estimates without them', () => {
|
||||
const inputs = { age_group: '45-54', cytology: 'HSIL+', hpv: 'positive' };
|
||||
expect(survivalGroups([{ index: '2026-01-01', predictions: [at(1, 0.2)], inputs }])[0].inputs)
|
||||
.toEqual(inputs);
|
||||
expect(riskGroups([{ text: 'Riesgo', index: '2026-01-01', predictions: [at(5, 0.2)] }])[0].inputs)
|
||||
.toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user