adding UtilsTest.convertDict2CSV

This commit is contained in:
frankknoll
2023-10-15 10:23:20 +02:00
parent 05e4b26087
commit 5cc2b0c99f
5 changed files with 2585 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
QUnit.module('UtilsTest', function () {
QUnit.test('convertDict2CSV', function (assert) {
// Given
const dict = {
"MM,R": 26.17432376240791,
"VARCEL": 10.549534724816644
};
// When
const csv = Utils.convertDict2CSV(dict);
// Then
const csvExpected = '"MM,R","VARCEL"\n26.17432376240791,10.549534724816644';
assert.equal(csv, csvExpected);
});
});