blob: 6b63184f2589adbb40d1ef770d0ee0408f3de9c9 [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
var object = {};
object.__proto__ = {};
shouldBe(object + 42, `[object Object]42`);
shouldBe(object + 42, `[object Object]42`);
object.__proto__.toString = function () {
return "Hey";
};
shouldBe(object + 42, `Hey42`);