DataFrame processing: Require table rows to be array (#20357)

This commit is contained in:
Šimon Podlipský
2019-11-13 14:30:08 +01:00
committed by Dominik Prokop
parent 17fe704ae8
commit 4260cd548f
2 changed files with 14 additions and 3 deletions
@@ -59,6 +59,15 @@ describe('toDataFrame', () => {
expect(again).toBe(input);
});
it('throws when table rows is not array', () => {
expect(() =>
toDataFrame({
columns: [],
rows: {},
})
).toThrowError('Expected table rows to be array, got object.');
});
it('migrate from 6.3 style rows', () => {
const oldDataFrame = {
fields: [{ name: 'A' }, { name: 'B' }, { name: 'C' }],