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

Commented Unassigned: Add support for file-system XHR requests in tests [280]

$
0
0
Using Chutzpah as test runner, any tests that needs to make XHR requests will fail because of cross-domain policy on local file systems.

In Chrome you can disable this "feature" by starting chrome with the "--disable-web-security" flag.

In PhantomJS you can also disable this using the "--local-to-remote-url-access" option, see https://github.com/ariya/phantomjs/wiki/API-Reference#command-line-options

Ideally we would be able to pass this option (or other phantomJS options) through via Chutzpah config, but even just hardcoding this as the default would be preferable, since this mimics the actual production environment where you can make local XHR requests better than having it disabled.

Without this, we can't use the "text" RequireJS plugin, which makes it impossible to create good component tests of UI code or generally anything that loads non-JS resources dynamically.


Comments: Chutzpah *does* set the PhantomJS option you mentioned: https://chutzpah.codeplex.com/SourceControl/latest#Chutzpah/JSRunners/chutzpahRunner.js

Viewing all articles
Browse latest Browse all 1864

Trending Articles



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