node/test/parallel/test-console-not-call-toStr...

13 lines
240 B
JavaScript

var common = require('../common');
var assert = require('assert');
var func = function() {};
var toStringCalled = false;
func.toString = function() {
toStringCalled = true;
};
require('util').inspect(func);
assert.ok(!toStringCalled);