We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2344e3e commit b613950Copy full SHA for b613950
test/parallel/test-util-inspect.js
@@ -2991,3 +2991,23 @@ assert.strictEqual(
2991
// Consistency check.
2992
assert(fullObjectGraph(global).has(Function.prototype));
2993
}
2994
+
2995
+{
2996
+ // Confirm that own constructor value displays correctly.
2997
2998
+ function Fhqwhgads() {}
2999
3000
+ const sterrance = new Fhqwhgads();
3001
+ sterrance.constructor = Fhqwhgads;
3002
3003
+ assert.strictEqual(
3004
+ util.inspect(sterrance, { showHidden: true }),
3005
+ 'Fhqwhgads {\n' +
3006
+ ' constructor: <ref *1> [Function: Fhqwhgads] {\n' +
3007
+ ' [length]: 0,\n' +
3008
+ " [name]: 'Fhqwhgads',\n" +
3009
+ ' [prototype]: { [constructor]: [Circular *1] }\n' +
3010
+ ' }\n' +
3011
+ '}'
3012
+ );
3013
+}
0 commit comments