QUnit Tests for Metro Style Apps
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.
- qunit.css in css folder
- qunit.js and tests.js in js folder
- default.html in the project root folder (content updated)