Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Add test cases for #1944.
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate authored and koichik committed Oct 26, 2011
1 parent ebefe77 commit 4fb2ac5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/simple/test-util-inspect.js
Expand Up @@ -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);
});

0 comments on commit 4fb2ac5

Please sign in to comment.