From 589ff04b41a297a216b3e52ec14b0fde3c80fa5e Mon Sep 17 00:00:00 2001 From: Colin Ihrig Date: Tue, 16 Aug 2016 13:35:47 -0400 Subject: [PATCH] fix broken test from Node v6.4.0 update (#82) --- test/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/index.js b/test/index.js index 645e40e..39be3c3 100755 --- a/test/index.js +++ b/test/index.js @@ -217,7 +217,12 @@ describe('expect()', () => { } Code.settings.truncateMessages = origTruncate; - Hoek.assert(exception.message === 'Expected { a: 1,\n b: \'12345678901234567890123456789012345678901234567890\' } to be a string but got \'object\'', exception); + + const lines = exception.message.split('\n'); + + Hoek.assert(lines.length === 2, exception); + Hoek.assert(lines[0].trim() === 'Expected { a: 1,', exception); + Hoek.assert(lines[1].trim() === 'b: \'12345678901234567890123456789012345678901234567890\' } to be a string but got \'object\'', exception); done(); });