Closed fzaninotto closed 9 years ago
var collection = new Collection([ { tags: ['a', 'b', 'c'] }, { tags: ['b', 'c', 'd'] }, { tags: ['c', 'd', 'e'] }, ]); var expected = [ { id: 0, tags: ['a', 'b', 'c'] }, { id: 1, tags: ['b', 'c', 'd'] }, ]; expect(collection.getAll({filter: { tags: 'b' } })).toEqual(expected) expect(collection.getAll({filter: { tags: 'f' } })).toEqual([])