Does chutzpah support padding / config?

I have some qunit tests to test my code that uses requirejs extensively. I am using Chutzpah to run a test running in VS. Everything works fine if I run tests in a browser, but not only from VS. This seems to ignore my require.config call. If I change my links in my files so as not to point to the gaskets, but directly to the files, it will work, but this breaks other things in my code.

Does anybody work? If so, how? I looked at their sample code, but it does not use require.config and paddings.

+6
source share
1 answer

Start with this tutorial .

To start the configuration using pads, simply add a link to your configuration file in chutzpah.json. The example below is a bit simplified for readability.

Chutzpah.json file

{ "Framework": "qunit", "TestHarnessReferenceMode": "AMD", "TestHarnessLocationMode": "SettingsFileAdjacent", "References": [ { "Path": "../Scripts/Components/RequireJS/require.js" }, { "Path": "config.js" } ] } 

Config.js file

 require.config({ "paths": { "jquery": "../Scripts/jquery-2.1.4", "jquery-linq": "../Scripts/jquery.linq", "signalr": "../Scripts/jquery.signalR-2.2.0", "signalrhubs": "../Scripts/mock-signalr-hubs", "knockout": "../Scripts/knockout-3.3.0", "constants": "../Scripts/constants", "HomeVm": "Source/HomeVm" }, "shim": { "jquery.linq": { "deps": ["jquery"] }, "bootstrap": { "deps": ["jquery"] }, "signalr": { "deps": ["jquery"] } } }); 
0
source

All Articles