| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2344e3e commit b613950
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2991,3 +2991,23 @@ assert.strictEqual( | |||
| 2991 | 2991 | // Consistency check. | |
| 2992 | 2992 | assert(fullObjectGraph(global).has(Function.prototype)); | |
| 2993 | 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 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments