💄 fix spec failure caused by win32 path delimiter.
This commit is contained in:
parent
256215b749
commit
8acd6d6c8a
1 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
assert = require 'assert'
|
assert = require 'assert'
|
||||||
ipc = require 'ipc'
|
ipc = require 'ipc'
|
||||||
|
path = require 'path'
|
||||||
remote = require 'remote'
|
remote = require 'remote'
|
||||||
protocol = remote.require 'protocol'
|
protocol = remote.require 'protocol'
|
||||||
|
|
||||||
|
@ -113,7 +114,8 @@ describe 'protocol API', ->
|
||||||
free()
|
free()
|
||||||
assert false, 'Got error: ' + errorType + ' ' + error
|
assert false, 'Got error: ' + errorType + ' ' + error
|
||||||
protocol.interceptProtocol targetScheme, (request) ->
|
protocol.interceptProtocol targetScheme, (request) ->
|
||||||
assert.equal request.url, "#{targetScheme}://#{__filename}"
|
pathInUrl = path.normalize request.url.substr(8)
|
||||||
|
assert.equal pathInUrl, __filename
|
||||||
|
|
||||||
it 'can override original protocol handler', (done) ->
|
it 'can override original protocol handler', (done) ->
|
||||||
handler = remote.createFunctionWithReturnValue 'valar morghulis'
|
handler = remote.createFunctionWithReturnValue 'valar morghulis'
|
||||||
|
|
Loading…
Reference in a new issue