From 8acd6d6c8a38a639887091c0f4ce3e297b18eed8 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 5 Sep 2013 12:24:08 +0800 Subject: [PATCH] :lipstick: fix spec failure caused by win32 path delimiter. --- spec/api/protocol.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/api/protocol.coffee b/spec/api/protocol.coffee index 2a2c8175..0f3176da 100644 --- a/spec/api/protocol.coffee +++ b/spec/api/protocol.coffee @@ -1,5 +1,6 @@ assert = require 'assert' ipc = require 'ipc' +path = require 'path' remote = require 'remote' protocol = remote.require 'protocol' @@ -113,7 +114,8 @@ describe 'protocol API', -> free() assert false, 'Got error: ' + errorType + ' ' + error 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) -> handler = remote.createFunctionWithReturnValue 'valar morghulis' -- 2.43.0