1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-13 15:10:06 +00:00

fix(convert-to-csv): return empty string if table is not an array

This commit is contained in:
Yury Shkoda
2022-03-03 17:31:23 +03:00
parent 4f3478c215
commit f6abb61c69
4 changed files with 12 additions and 3 deletions

View File

@@ -219,4 +219,10 @@ describe('convertToCsv', () => {
new Error('No table provided to be converted to CSV')
)
})
it('should empty string if table is not an array', () => {
const data = { [tableName]: true }
expect(convertToCSV(data, tableName)).toEqual('')
})
})