Skip to content

Commit

Permalink
Forced the unitTestContainer to start hidden
Browse files Browse the repository at this point in the history
Added README for NuGet package
  • Loading branch information
csharpfritz committed Jun 10, 2012
1 parent 150c0d0 commit 5a760ad
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions src/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
v0.2.0 - 6/10/2012

Thank you for choosing to install QUnit-Metro. This initial release should get you started with writing simple unit tests for your WinJS Metro applications.

To get started, in your App Bar control in default.htm add the following button:
<button data-win-control="WinJS.UI.AppBarCommand" data-win-options="{id:'runTestsAppBarCmd', label:'Run Tests', icon:'repair', section: 'global', onclick: QUnitMetro.runTests}"></button>

In the default.htm page, add this container for the unit test results:
<div id="unitTestContainer">
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<button id="closeTests">Close</button>
</div>


Next, add references to the QUnit-Metro script and css in each page of your app:
<script src="/js/qunitmetro.js"></script>
<link href="/css/qunitmetro.css" rel="stylesheet" />

Finally, on those pages where you would like to run tests, include a script reference to your test file:
<script src="test.js"></script>

On those pages that contain tests, you should be able to access the AppBar in your app, and click the 'Run Tests' button to run your unit tests.
2 changes: 1 addition & 1 deletion src/qunitmetro.css
Original file line number Diff line number Diff line change
Expand Up @@ -263,5 +263,5 @@
top: 0px;
left: 0px;
z-index: 11; /* Because 11 is 1 higher than 10 */

display: none;
}

0 comments on commit 5a760ad

Please sign in to comment.