Add filters

This commit is contained in:
Pieter Vander Vennet 2022-01-08 22:11:24 +01:00
parent 965faca0e5
commit 42a6b37ca6
13 changed files with 287 additions and 219 deletions

View file

@ -516,7 +516,14 @@ export default class TagSpec extends T {
const filter = TagUtils.Tag("_key~*")
T.isTrue(filter.matchesProperties(properties), "Lazy value not matched")
}
]]);
],
["test date comparison",() => {
const filter = TagUtils.Tag("date_created<2022-01-07")
T.isFalse(filter.matchesProperties({"date_created":"2022-01-08"}), "Date comparison: expected a match")
T.isTrue(filter.matchesProperties({"date_created":"2022-01-01"}), "Date comparison: didn't expect a match")
}]]);
}
}