Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

immutable-test.js 576B

1234567891011121314151617181920
  1. import * as assert from 'assert';
  2. import * as Immutable from 'immutable';
  3. import sift from '..';
  4. const ObjectID = require('bson').ObjectID;
  5. describe(__filename + '#', function() {
  6. var topic = Immutable.List([1, 2, 3, 4, 5, 6, 6, 4, 3]);
  7. var persons = Immutable.fromJS([{ person: {age: 3} }, { person: {age: 5} }, { person: {age: 8} }]);
  8. it('works with Immutable.Map in a Immutable.List', function() {
  9. assert.equal(sift({ 'person.age' : { $gt: 4 } }, persons).size, 2);
  10. assert.equal(persons.filter(sift({ 'person.age' : { $gt: 4 } })).size, 2);
  11. });
  12. });