From 435855547b115b19423aee089c16557e55943353 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 14 May 2018 18:04:30 +0200 Subject: [PATCH] test: slightly improve test-util-inspect assertions --- test/parallel/test-util-inspect.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index ad5f738a85976b..2b8e14e45f64e6 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -1374,7 +1374,8 @@ util.inspect(process); expect = 'WeakMap { [ [length]: 0 ] => {}, ... more items, extra: true }'; const expectAlt = 'WeakMap { {} => [ [length]: 0 ], ... more items, ' + 'extra: true }'; - assert(out === expect || out === expectAlt); + assert(out === expect || out === expectAlt, + `Found "${out}" rather than "${expect}" or "${expectAlt}"`); } { // Test WeakSet @@ -1397,7 +1398,8 @@ util.inspect(process); expect = 'WeakSet { {}, ... more items, extra: true }'; const expectAlt = 'WeakSet { [ 1, [length]: 1 ], ... more items, ' + 'extra: true }'; - assert(out === expect || out === expectAlt); + assert(out === expect || out === expectAlt, + `Found "${out}" rather than "${expect}" or "${expectAlt}"`); } { // Test argument objects.