This commit is contained in:
ryan
2019-03-12 21:05:33 -07:00
parent f165139bae
commit 4652138987
3 changed files with 5 additions and 7 deletions
@@ -23,12 +23,10 @@ export class TableReducePicker extends PureComponent<Props> {
};
componentDidMount() {
console.log('MOUNT!', this);
this.checkInput();
}
componentDidUpdate(prevProps: Props) {
console.log('UPDATE', this);
this.checkInput();
}
@@ -9,18 +9,18 @@ describe('Table Reducer', () => {
TableReducerID.sum,
TableReducerID.max,
TableReducerID.min,
// TableReducerID.logmin,
// TableReducerID.logmin,
TableReducerID.mean,
TableReducerID.last,
TableReducerID.first,
TableReducerID.count,
TableReducerID.range,
TableReducerID.diff,
// TableReducerID.allIsZero,
// TableReducerID.allIsNull,
// TableReducerID.allIsZero,
// TableReducerID.allIsNull,
];
const reducers = getTableReducers(names);
reducers.forEach( (reducer, index) => {
reducers.forEach((reducer, index) => {
expect(reducer ? reducer.value : '<missing>').toEqual(names[index]);
});
});
@@ -65,6 +65,7 @@ describe('Table Reducer', () => {
columnIndexes: [0, 1],
stats: ['mean'],
});
expect(reduced.length).toBe(1);
expect(reduced[0].rows[0]).toEqual([15, 25]);
});
@@ -138,7 +138,6 @@ function getById(id: string): TableReducerInfo {
alias: 'total',
},
{ value: TableReducerID.count, label: 'Count', description: 'Value Count', emptyInputResult: 0, standard: true },
{
value: TableReducerID.range,
label: 'Range',