function C() { this.foo = 'bar'; } C.prototype.bar = function() { }; assertEqual(new C().foo, 'bar'); test(function() { return new C(); });