adding ScatterChart2CsvConverterTest

This commit is contained in:
frankknoll
2023-11-10 17:57:07 +01:00
parent ab16d68f0f
commit acfe871d1d
6 changed files with 59 additions and 5 deletions

View File

@@ -0,0 +1,31 @@
QUnit.module('ScatterChart2CsvConverterTest', function () {
QUnit.test('convertScatterChart2Csv', function (assert) {
// Given
const scatterChartDescr = {
symptomX: 'Adult failure to thrive',
symptomY: 'Acariasis',
batches: ['002A21A', '002A21B'],
data: [
{
x: 2.1,
y: 3.1
},
{
x: 4.1,
y: 5.1
}
]
};
// When
const csv = ScatterChart2CsvConverter.convertScatterChart2Csv(scatterChartDescr);
// Then
const csvExpected =
`"Batch","PRR ratio of Batch for Adult failure to thrive","PRR ratio of Batch for Acariasis"
"002A21A",2.1,3.1
"002A21B",4.1,5.1`;
assert.equal(csv, csvExpected);
});
});