11 lines
463 B
TypeScript
11 lines
463 B
TypeScript
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);
|
|
});
|
|
});
|