I have uploaded a new version of this project template (for Qunit 1.10.0 & Visual Studio 2012 RTM)here. Please download the new version.
QUnitis a powerful, easy-to-use JavaScript unit test suite. This project template enables you to create QUnit Tests for Metro style apps built using Html/Javascript.After installing this project template (and restarting Visual Studio), you can choose New Project -> Javascript -> QUnit Test for Metro Style Apps. You can hit F5 now to run the sample tests and see the results.
Metro style apps run in an an app container that restricts the capabilities of application. This is intended to protect the user from malicious apps. In order to run QUnit Tests inside the app container, I have made one change in qunit.js (added a window.toStaticHtml around the banner innerHtml). In addition, please note that I have added two capabilities in the appxmanifest [for Internet(client) and Document Library access]. These capabilities are used in my sample Metro style tests.
The sample tests are defined in the file tests.js in the js folder. There are 5 sample tests already defined for your reference. I built this project template by starting from a Blank App and adding the required qunit files.
|