var vows = require('vows'),
    assert = require('assert'),
    getIn = require('../src/getIn');

vows.describe('getIn()').addBatch({
  'Getting': {
    topic: function() {
      return {
        foo: {
          bar: 1
        }
      };
    },
    'an existing property returns the value': function(obj) {
      assert.equal(getIn(obj, ['foo', 'bar']), 1);
    },
    'a non-existing property returns null by default': function(obj) {
      assert.isUndefined(getIn(obj, ['bar', 'foo']));
    },
    'a property on a null or undefined object returns undefined by default': function(obj) {
      assert.isUndefined(getIn(null, ['bar']));
      assert.isUndefined(getIn(undefined, ['bar']));
    },
    'a non-existing property returns the default value if provided': function(obj) {
      assert.equal(getIn(obj, ['foo', 'not-there'], 42), 42);
      assert.equal(getIn(obj, ['not-there'], 42), 42);
    },
  }
}).export(module);
@@ -396,20 +396,25 @@
 returns 
-null
+undefined
  by defa
@@ -492,24 +492,180 @@
 %5D));%0A    %7D,%0A
+    'a deeply nested non-existing property returns undefined by default': function(obj) %7B%0A      assert.isUndefined(get(obj, %5B'bar', 'baz', 'qux'%5D));%0A    %7D,%0A
     'a prope
@@ -1084,8 +1084,9 @@
 module);
+%0A

put the nested undefined in the right test spot