env-js icon indicating copy to clipboard operation
env-js copied to clipboard

Fixing filesystem paths in Envjs.uri

Open moschel opened this issue 15 years ago • 1 comments

This pull requests fixes 2 issues and adds a test for both:

  1. If you put in an absolute windows path in any browser, like this: C:\foo\bar\index.html, it will convert it to file:///C:/foo/bar/index.html.

  2. If you have document=null and you try to open a relative path, like this: specs/env/spec.html, Envjs tries to convert this to a file: URL. However, this wasn't working quite right in Windows beacuse getcwd() returns the wrong slash, and file:/// should have 3 slashes, not 2.

  • Brian

moschel avatar Nov 04 '10 07:11 moschel

I have tested this patch locally on my Windows dev box and it worked great. This patch is critical if you are planning on running Jasmine and Jasmine-Species in a headless setup (outside the browser). Without it you will not be able to run.

techarch avatar Dec 25 '10 17:12 techarch