Browse Source

Add test cases for #1944.

v0.7.4-release
Nathan Rajlich 13 years ago
committed by koichik
parent
commit
4fb2ac5be1
  1. 13
      test/simple/test-util-inspect.js

13
test/simple/test-util-inspect.js

@ -62,3 +62,16 @@ assert.ok(ex.indexOf('[type]') != -1);
// GH-1941
// should not throw:
assert.equal(util.inspect(Object.create(Date.prototype)), '{}')
// GH-1944
assert.doesNotThrow(function () {
var d = new Date();
d.toUTCString = null;
util.inspect(d);
});
assert.doesNotThrow(function () {
var r = /regexp/;
r.toString = null;
util.inspect(r);
});

Loading…
Cancel
Save