Quantcast
Channel: Chutzpah - A JavaScript Test Runner
Viewing all articles
Browse latest Browse all 1864

Commented Issue: Chutzpah Fails When '#' Character in Test File Path [99]

$
0
0
Referenced in HTML test runner:

<script type="text/javascript" src="file:///d:/workspace/dropbox/programming workspace/c#/personal projects/nancyangular/nancyangular/scripts/test.js"></script>

Error:
Uncaught SyntaxError: Unexpected token < /D:/workspace/dropbox/programming%20workspace/c/#/personal projects

Moving the file out of the 'C#' directory:

Fixed the issue.
Comments: The same happens if your username contains a hash, or any file path (or temporary file path, including username) contains a non-url compatible unicode character. The error is caused by line 193 of TestHarness.cs. Basically change this: ``` return "file:///" + referencePath.Replace('\\', '/'); ``` to this: ``` return "file:///" + HttpUtility.UrlEncode(referencePath).Replace("%5C", "/"); ``` I've attached a patched copy of chutzpah.dll that has this fix (built from the commit 162004a847ae version)

Viewing all articles
Browse latest Browse all 1864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>