QUnitis a powerful, easy-to-use JavaScript unit test suite. This project template enables you to create QUnit Tests for Windows Store apps built using Html/Javascript.After installing this project template (and restarting Visual Studio), you can choose New Project -> Javascript -> QUnit Test. You can hit F5 now to run the sample tests and see the results.
Windows Store 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 call). 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 Windows Store QUnit 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.
|