description( 'This test checks some object construction cases, including ' + '5939: final comma in javascript object prevents parsing' + '.'); shouldBe("var foo = { 'bar' : 'YES' }; foo.bar", "'YES'"); shouldBe("var foo = { 'bar' : 'YES', }; foo.bar", "'YES'"); shouldBe("var foo = { 'bar' : 'YES' , }; foo.bar", "'YES'"); shouldThrow("var foo = { , 'bar' : 'YES' }; foo.bar"); shouldThrow("var foo = { 'bar' : 'YES',, }; foo.bar");