Add filter tests

This commit is contained in:
Bán Dénes 2022-01-08 23:51:03 +01:00
parent a7f333c9bc
commit bd6b5a0ca6
3 changed files with 48 additions and 2 deletions

View file

@ -72,10 +72,10 @@ const simple = (exp, name, units) => {
value = exp
}
return point => keys.some(key => comparators[op](key, value, name, units))
return point => keys.some(key => comparators[op](key, value, name, units)(point))
}
const complex = (config, name, units, aggregator=_and) => {
const complex = (config, name, units, aggregator=_or) => {
// default is all points
if (config === undefined) {