import { strict as assert } from "assert";
import { sort } from "csv-sort";
assert.deepEqual(
sort(`Acc Number,Description,Debit Amount,Credit Amount,Balance,
123456,Client #1 payment,,1000,1940
123456,Bought carpet,30,,950
123456,Bought table,10,,940
123456,Bought pens,10,,1000
123456,Bought chairs,20,,980
`),
{
res: [
["Acc Number", "Description", "Debit Amount", "Credit Amount", "Balance"],
["123456", "Client #1 payment", "", "1000", "1940"],
["123456", "Bought table", "10", "", "940"],
["123456", "Bought carpet", "30", "", "950"],
["123456", "Bought chairs", "20", "", "980"],
["123456", "Bought pens", "10", "", "1000"],
],
msgContent: null,
msgType: null,
}
);