From 4547099fb972af6c793519a2550fcee9c8b1c063 Mon Sep 17 00:00:00 2001 From: Josh Junon Date: Wed, 4 Nov 2015 09:57:06 -0600 Subject: [PATCH] added test for appending original message --- test/test.coffee | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test.coffee b/test/test.coffee index fccc6b8..42ffe1e 100644 --- a/test/test.coffee +++ b/test/test.coffee @@ -79,6 +79,12 @@ it 'should allow the editing of the message (multiple lines)', -> originalErr.foo = '1234' originalErr.message.should.equal 'hello\nfoobar 1234' +it 'should allow the editing of the message (append original)', -> + originalErr = new Error 'herp derp' + TestError = errorEx 'TestError', foo:message: (v, message)-> message.concat ['hello, there'] + TestError.call originalErr + originalErr.message.should.equal 'herp derp\nhello, there' + describe 'helpers', -> describe 'append', -> it 'should append to the error string', ->