diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index cd7d08caf0a0f8..ab79bd45eb2801 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -1688,7 +1688,7 @@ assert.strictEqual( assert.strictEqual( inspect( { a200: 4, a100: 1, a102: 3, a101: 2 }, - { sorted(a, b) { return a < b; } } + { sorted(a, b) { return a === b ? 0 : (a < b ? 1 : -1); } } ), '{ a200: 4, a102: 3, a101: 2, a100: 1 }' );