mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
BufferedProcess::onDidThrowError -> ::onDidThrowError
This commit is contained in:
@@ -17,14 +17,15 @@ describe "BufferedProcess", ->
|
||||
args: ['nothing']
|
||||
options: {}
|
||||
|
||||
process.onDidThrowError errorSpy = jasmine.createSpy()
|
||||
errorSpy = jasmine.createSpy().andCallFake (error) -> error.handle()
|
||||
process.onWillThrowError(errorSpy)
|
||||
|
||||
waitsFor -> errorSpy.callCount > 0
|
||||
|
||||
runs ->
|
||||
expect(window.onerror).not.toHaveBeenCalled()
|
||||
expect(errorSpy).toHaveBeenCalled()
|
||||
expect(errorSpy.mostRecentCall.args[0].message).toContain 'spawn bad-command-nope ENOENT'
|
||||
expect(errorSpy.mostRecentCall.args[0].error.message).toContain 'spawn bad-command-nope ENOENT'
|
||||
|
||||
describe "when there is not an error handler specified", ->
|
||||
it "calls the error handler and does not throw an exception", ->
|
||||
|
||||
Reference in New Issue
Block a user