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: So, you do hit on one truth. When you tell Chutzpah to launch the file in a browser it does not launch it with the security disabled flag. When chutzpah opens the browser for you it just launches the default browser and doesn't specifically launch chrome so it cant pass those args. But when running in phantom it does.
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: So, you do hit on one truth. When you tell Chutzpah to launch the file in a browser it does not launch it with the security disabled flag. When chutzpah opens the browser for you it just launches the default browser and doesn't specifically launch chrome so it cant pass those args. But when running in phantom it does.