title: How does the chai expect function work?
body: <p>From chai's api you've got code like this:</p>
  
  <pre><code>.exist
  
  Asserts that the target is neither null nor undefined.
  
  var foo = 'hi'
    , bar = null
    , baz;
  
  expect(foo).to.exist;
  expect(bar).to.not.exist;
  expect(baz).to.not.exist;
  </code></pre>
  
  <p>How does that exist part work? The expect function returns an object, then there's simply a property lookup on the "to" object. That's simply a property evaluation though isn't it? The only thing that would make sense to me is if the exist property is a getter method.</p>
  
  <p>What's the go?</p>