Add test cases for #1944.
This commit is contained in:
parent
ebefe77bc0
commit
4fb2ac5be1
@ -62,3 +62,16 @@ assert.ok(ex.indexOf('[type]') != -1);
|
|||||||
// GH-1941
|
// GH-1941
|
||||||
// should not throw:
|
// should not throw:
|
||||||
assert.equal(util.inspect(Object.create(Date.prototype)), '{}')
|
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…
x
Reference in New Issue
Block a user