Issue #41 is a result of $hasAll not having a test - I'd like to suggest that a "meta-test" be added simply to make sure all query selectors have an associated test. This would assert a certain level test coverage.
I imagine it would look something like looping over Query.selectors and making sure a key for the selector exists in queryTests:
https://github.com/bevry/query-engine/blob/master/src/documents/test/queries-test.js.coffee#L71
The selectors are defined here:
https://github.com/bevry/query-engine/blob/master/src/documents/lib/query-engine.js.coffee#L1214-L1470
It could even be as simple/naive as:
Object.keys(queryTests).length is Object.keys(Query.selectors).length
PS: If you want to get even more meta - test just $hasAll and then use that to test that queryTests has all of the keys of Query.selectors. WE CAN GO DEEPER
Issue #41 is a result of
$hasAllnot having a test - I'd like to suggest that a "meta-test" be added simply to make sure all query selectors have an associated test. This would assert a certain level test coverage.I imagine it would look something like looping over
Query.selectorsand making sure a key for the selector exists inqueryTests:https://github.com/bevry/query-engine/blob/master/src/documents/test/queries-test.js.coffee#L71
The selectors are defined here:
https://github.com/bevry/query-engine/blob/master/src/documents/lib/query-engine.js.coffee#L1214-L1470
It could even be as simple/naive as:
PS: If you want to get even more meta - test just
$hasAlland then use that to test thatqueryTestshas all of the keys ofQuery.selectors. WE CAN GO DEEPER