old_contents: import test from 'ava'
  import Querent from './Querent'
  
  test('query', t => {
    const JUMP = { id: 1, verb: 'jump', active: true, nested: { value: 1 } }
    const RUN = { id: 2, verb: 'run', active: false, nested: { value: 2 } }
    const SWIM = { id: 3, verb: 'swim', active: true, nested: { value: 3 } }
    const DANCE = { id: 4, verb: 'dance', active: false, nested: { value: 4 } }
    const HIKE = { id: 5, verb: 'hike', active: true, nested: { value: 5 } }
  
    const ACTIONS = [ JUMP, RUN, SWIM, DANCE, HIKE ]
  
    t.deepEqual(Querent.query(ACTIONS, { verb: 'run' }), [ RUN ])
    t.deepEqual(Querent.query(ACTIONS, { verb: ['jump', 'run'] }), [ JUMP, RUN ])
    t.deepEqual(Querent.query(ACTIONS, { verb: { '!': 'swim' } }), [ JUMP, RUN, DANCE, HIKE ])
    t.deepEqual(Querent.query(ACTIONS, { active: true, verb: { '!': ['jump', 'hike'] } }), [ SWIM ])
    t.deepEqual(Querent.query(ACTIONS, { id: { '<': 2 } }), [ JUMP ])
    t.deepEqual(Querent.query(ACTIONS, { id: { '<=': 5 } }), [ JUMP, RUN, SWIM, DANCE, HIKE ])
    t.deepEqual(Querent.query(ACTIONS, { id: { '!': { '>': 0 } } }), [])
    t.deepEqual(Querent.query(ACTIONS, { id: { '>=': 5 } }), [ HIKE ])
    t.deepEqual(Querent.query(ACTIONS, { nested: { value: [1, 5] } }), [ JUMP, HIKE ])
  })
  
  test('matches', t => {
    const JUMP = { id: 1, verb: 'jump', active: true, nested: { value: 1 } }
  
    t.false(Querent.matches(JUMP, { verb: 'run' }))
    t.true(Querent.matches(JUMP, { verb: ['jump', 'run'] }))
    t.true(Querent.matches(JUMP, { verb: { '!': 'swim' } }))
    t.false(Querent.matches(JUMP, { active: true, verb: { '!': ['jump', 'hike'] } }))
    t.true(Querent.matches(JUMP, { id: { '<': 2 } }))
    t.true(Querent.matches(JUMP, { id: { '<=': 5 } }))
    t.false(Querent.matches(JUMP, { id: { '!': { '>': 0 } } }))
    t.false(Querent.matches(JUMP, { id: { '>=': 5 } }))
    t.true(Querent.matches(JUMP, { nested: { value: [1, 5] } }))
  })
  
new_contents: import test from 'ava'
  import Querent from './Querent'
  
  test('query', t => {
    const BART = { surname: 'Simpson', age: 10, grades: { math: 'F' } }
    const LISA = { surname: 'Simpson', age: 7, grades: { math: 'A' } }
    const MILHOUSE = { surname: 'Van Houten', age: 10, grades: { math: 'B' } }
    const RALPH = { surname: 'Wiggum', age: 8, grades: { math: 'F' } }
  
    const STUDENTS = [ BART, LISA, MILHOUSE, RALPH ]
  
    t.deepEqual(Querent.query(STUDENTS, { surname: 'Simpson' }), [ BART, LISA ])
    t.deepEqual(Querent.query(STUDENTS, { surname: ['Simpson', 'Wiggum'] }), [ BART, LISA, RALPH ])
    t.deepEqual(Querent.query(STUDENTS, { surname: { '!': 'Simpson' } }), [ MILHOUSE, RALPH ])
    t.deepEqual(Querent.query(STUDENTS, { surname: { '!': ['Simpson'] }, age: 10 }), [ MILHOUSE ])
  
    t.deepEqual(Querent.query(STUDENTS, { age: { '<': 8 } }), [ LISA ])
    t.deepEqual(Querent.query(STUDENTS, { age: { '<=': 8 } }), [ LISA, RALPH ])
    t.deepEqual(Querent.query(STUDENTS, { age: { '>': 8 } }), [ BART, MILHOUSE ])
    t.deepEqual(Querent.query(STUDENTS, { age: { '>=': 8 } }), [ BART, MILHOUSE, RALPH ])
    t.deepEqual(Querent.query(STUDENTS, { age: { '!': { '>': 1 } } }), [])
  
    t.deepEqual(Querent.query(STUDENTS, { grades: { math: ['A', 'B'] } }), [ LISA, MILHOUSE ])
  })
  
  test('matches', t => {
    const BART = { surname: 'Simpson', age: 10, grades: { math: 'F' } }
  
    t.true(Querent.matches(BART, BART))
  
    t.true(Querent.matches(BART, { surname: 'Simpson' }))
    t.false(Querent.matches(BART, { surname: 'Van Houten' }))
  
    t.true(Querent.matches(BART, { surname: ['Simpson'] }))
    t.false(Querent.matches(BART, { surname: ['Wiggum', 'Van Houten'] }))
  
    t.true(Querent.matches(BART, { surname: { '!': 'Wiggum' } }))
    t.false(Querent.matches(BART, { surname: { '!': ['Van Houten', 'Simpson'] } }))
  
    t.true(Querent.matches(BART, { age: 10 }))
    t.true(Querent.matches(BART, { age: { '<': 12 } }))
    t.false(Querent.matches(BART, { age: { '>': 12 } }))
    t.true(Querent.matches(BART, { age: { '<=': 10 } }))
    t.true(Querent.matches(BART, { age: { '>=': 10 } }))
    t.false(Querent.matches(BART, { age: { '<=': 8 } }))
    t.false(Querent.matches(BART, { age: { '>=': 12 } }))
    t.false(Querent.matches(BART, { age: { '!': 10 } }))
    t.false(Querent.matches(BART, { age: { '!': { '>': 1 } } }))
  
    t.true(Querent.matches(BART, { grades: { math: 'F' } }))
    t.true(Querent.matches(BART, { grades: { math: ['F'] } }))
  })
  
subject: Use students from The Simpsons for the tests