Permalink
Browse files

Modify "Running..." to display test name. Fixes #220

  • Loading branch information...
1 parent 6ec4cc2 commit d6908bb6699d7546bcb5b7c7cc6d5fbabfc9d76e @rwaldron committed with jzaefferer Mar 22, 2012
Showing with 22 additions and 0 deletions.
  1. +3 −0 addons/themes/nv.css
  2. +3 −0 qunit/qunit.css
  3. +7 −0 qunit/qunit.js
  4. +9 −0 test/test.js
View
@@ -193,6 +193,9 @@
padding: 0.5em 0.5em 0.5em 2.5em;
color: #333;
}
+#qunit-testresult .module-name {
+ font-weight: bold;
+}
/** Fixture */
View
@@ -220,6 +220,9 @@
border-bottom: 1px solid white;
}
+#qunit-testresult .module-name {
+ font-weight: bold;
+}
/** Fixture */
View
@@ -100,6 +100,13 @@ Test.prototype = {
},
run: function() {
config.current = this;
+
+ var running = id("qunit-testresult");
+
+ if ( running ) {
+ running.innerHTML = "Running: <br/>" + this.name;
+ }
+
if ( this.async ) {
QUnit.stop();
}
View
@@ -329,6 +329,15 @@ test("basics", function() {
equal( document.getElementById("qunit-fixture").innerHTML, "test markup", "automatically reset" );
});
+test("running test name displayed", function() {
+ expect(2);
+
+ var displaying = document.getElementById("qunit-testresult");
+
+ ok( /running test name displayed/.test(displaying.innerHTML), "Expect test name to be found in displayed text" );
+ ok( /fixture/.test(displaying.innerHTML), "Expect module name to be found in displayed text" );
+});
+
}
module("custom assertions");

0 comments on commit d6908bb

Please sign in to comment.