Example #1
0
 it('should return undefined for none matching', function (done) {
   var filter = { query: { match: { query: 'foo' } } };
   mapMissing(filter).catch(function (result) {
     expect(result).to.be(filter);
     done();
   });
   $rootScope.$apply();
 });
Example #2
0
 it('should return the key and value for matching filters', function (done) {
   var filter = { missing: { field: '_type' } };
   mapMissing(filter).then(function (result) {
     expect(result).to.have.property('key', 'missing');
     expect(result).to.have.property('value', '_type');
     done();
   });
   $rootScope.$apply();
 });