Usar un solo selector de curvas para riesgo y supervivencia
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { figureChoices } from './curve-chooser';
|
||||
|
||||
describe('figureChoices', () => {
|
||||
it('keeps each band with its line, one choice per curve', () => {
|
||||
const data = [{ showlegend: false }, { name: 'Kaplan-Meier' }, { name: 'Weibull' }];
|
||||
const { choices, draw } = figureChoices({ data: data as never });
|
||||
expect(choices.map((c) => c.name)).toEqual(['Kaplan-Meier', 'Weibull']);
|
||||
expect(draw(new Set(['Kaplan-Meier'])).data.length).toBe(2);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user