read/write protocol handler map in IO

This commit is contained in:
Robo 2015-07-09 14:48:45 +05:30
parent 2cd5fb5694
commit c56b3425a9
3 changed files with 128 additions and 113 deletions

View file

@ -28,8 +28,10 @@ describe 'protocol module', ->
describe 'protocol.unregisterProtocol', ->
it 'throws error when scheme does not exist', ->
unregister = -> protocol.unregisterProtocol 'test3'
assert.throws unregister, /The Scheme has not been registered/
protocol.unregisterProtocol 'test3', (->), (error, scheme) ->
if (error)
assert.equal scheme, 'test3'
done()
describe 'registered protocol callback', ->
it 'returns string should send the string as request content', (done) ->