-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Now we can do
assert(visit.list().length === 2);Would be better implement method for this case.
assert(visit.count() === 2);And alternative for list().filter(..)
assert(visit.list().filter(x => x === 'foo').length > 0);
// ->
assert(visit.count(x => x === 'foo') > 0);
assert(visit.count('foo') > 0);
assert(visit.count({ foo: 1}) === 0);When non-function passed to visit.count() internal compareValues() for non-strict comparison should be used.