Skip to content

Commit

Permalink
added test for appending original message
Browse files Browse the repository at this point in the history
  • Loading branch information
Qix- committed Nov 4, 2015
1 parent 381f8be commit 4547099
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/test.coffee
Expand Up @@ -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', ->
Expand Down

0 comments on commit 4547099

Please sign in to comment.