spur-common
Version:
Common node library that is implemented through the use of spur-ioc and bluebird promises.
22 lines (17 loc) • 603 B
text/coffeescript
describe "UncaughtHandler", ->
beforeEach ->
=
on:(, )=>
exit:()=>
ioc = injector()
ioc.addDependency("nodeProcess", , true)
ioc.inject (, )=>
.useRecorder()
it "should exist", ->
expect().to.exist
it "should listen and process uncaughtException", ->
.listen()
expect().to.equal "uncaughtException"
expect(.recorded.error[0][0].message).to.equal "Oops!"
expect().to.equal 0