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.
Now we can do
Would be better implement method for this case.
And alternative for
list().filter(..)When non-function passed to
visit.count()internalcompareValues()for non-strict comparison should be used.