We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2bbf253 commit cb530d2Copy full SHA for cb530d2
test/parallel/test-util-inspect.js
@@ -3001,3 +3001,23 @@ assert.strictEqual(
3001
// Consistency check.
3002
assert(fullObjectGraph(global).has(Function.prototype));
3003
}
3004
+
3005
+{
3006
+ // Confirm that own constructor value displays correctly.
3007
3008
+ function Fhqwhgads() {}
3009
3010
+ const sterrance = new Fhqwhgads();
3011
+ sterrance.constructor = Fhqwhgads;
3012
3013
+ assert.strictEqual(
3014
+ util.inspect(sterrance, { showHidden: true }),
3015
+ 'Fhqwhgads {\n' +
3016
+ ' constructor: <ref *1> [Function: Fhqwhgads] {\n' +
3017
+ ' [length]: 0,\n' +
3018
+ " [name]: 'Fhqwhgads',\n" +
3019
+ ' [prototype]: { [constructor]: [Circular *1] }\n' +
3020
+ ' }\n' +
3021
+ '}'
3022
+ );
3023
+}
0 commit comments