protocol: wrapping httpjobfactory with a default protocol handler to intercept
This commit is contained in:
parent
e5380fd671
commit
7fee639edf
5 changed files with 62 additions and 0 deletions
|
@ -190,3 +190,10 @@ describe 'protocol module', ->
|
|||
assert false, 'Got error: ' + errorType + ' ' + error
|
||||
free()
|
||||
protocol.interceptProtocol 'file', handler
|
||||
|
||||
it 'can override http protocol handler', (done) ->
|
||||
handler = remote.createFunctionWithReturnValue 'valar morghulis'
|
||||
protocol.once 'intercepted', ->
|
||||
protocol.uninterceptProtocol 'http'
|
||||
done()
|
||||
protocol.interceptProtocol 'http', handler
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue