tests for text data table format

This commit is contained in:
Alexander Zobnin
2018-01-27 13:17:31 +03:00
parent 9eeb4fe468
commit 7a517be6e1
3 changed files with 147 additions and 5 deletions

View File

@@ -38,7 +38,21 @@ jest.mock('app/core/utils/datemath', () => {
}, {virtual: true});
jest.mock('app/core/table_model', () => {
return {};
return class TableModel {
constructor() {
this.columns = [];
this.columnMap = {};
this.rows = [];
this.type = 'table';
}
addColumn(col) {
if (!this.columnMap[col.text]) {
this.columns.push(col);
this.columnMap[col.text] = col;
}
}
};
}, {virtual: true});
jest.mock('jquery', () => 'module not found', {virtual: true});