spur-common
Version:
A Node.JS library of common modules used as a base to most Node.JS applications.
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