Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

test suites can be named by including an obj w/ name & path props wit…

…hin array param for .testSuites()
  • Loading branch information...
commit 740d85569548d6e377b290d0d108e8bb6897805c 1 parent 5542510
@busticated busticated authored
View
4 addons/composite/README.md
@@ -20,6 +20,6 @@ then specify the test suites to load using `QUnit.testSuites`:
QUnit.testSuites([
"test-file-1.html",
"test-file-2.html",
- "test-file-3.html"
+ { name: "Test File 3", path: "test-file-3.html" } // optionally provide a name and path
]);
-```
+```
View
2  addons/composite/composite-demo-test.html
@@ -12,7 +12,7 @@
"../../test/index.html",
"../canvas/canvas.html",
"../close-enough/close-enough.html",
- "../step/step.html"
+ { name: "step tests", path: "../step/step.html" }
]);
</script>
</head>
View
2  addons/composite/index.html
@@ -22,7 +22,7 @@
QUnit.testSuites([
"test-file-1.html",
"test-file-2.html",
-"test-file-3.html"
+{ name: "Test File 3", path: "test-file-3.html" } // optionally provide a name and path
]);
</pre>
<h4>Tests</h4>
View
9 addons/composite/qunit-composite.js
@@ -16,8 +16,15 @@ QUnit.extend( QUnit, {
},
runSuite: function( suite ) {
+ var path = suite;
+
+ if ( QUnit.is( 'object', suite ) ) {
+ path = suite.path;
+ suite = suite.name;
+ }
+
asyncTest( suite, function() {
- QUnit.iframe.setAttribute( "src", suite );
+ QUnit.iframe.setAttribute( "src", path );
});
},
Please sign in to comment.
Something went wrong with that request. Please try again.