Last change
on this file since 273 was
256,
checked in by hendrikvanantwerpen, 13 years ago
|
Reworked project structure based on REST interaction and Dojo library. As
soon as this is stable, the old jQueryUI branch can be removed (it's
kept for reference).
|
File size:
830 bytes
|
Line | |
---|
1 | define(["doh/runner"], function(doh) { |
---|
2 | doh.debug= print; |
---|
3 | doh.error= print; |
---|
4 | |
---|
5 | // Override the doh._report method to make it quit with an |
---|
6 | // appropriate exit code in case of test failures. |
---|
7 | var oldReport = doh._report; |
---|
8 | doh._report = function(){ |
---|
9 | oldReport.apply(doh, arguments); |
---|
10 | if(this._failureCount > 0 || this._errorCount > 0){ |
---|
11 | quit(1); |
---|
12 | } |
---|
13 | }; |
---|
14 | |
---|
15 | print("\n"+doh._line); |
---|
16 | print("The Dojo Unit Test Harness, $Rev: 23869 $"); |
---|
17 | print("Copyright (c) 2011, The Dojo Foundation, All Rights Reserved"); |
---|
18 | for (var tests= [], args= doh.config["commandLineArgs"], i= 0, arg; i<args.length; i++) { |
---|
19 | arg= (args[i]+"").split("="); |
---|
20 | if (arg.length==2 && arg[0]=="test") { |
---|
21 | var test= arg[1]; |
---|
22 | print("loading test " + test); |
---|
23 | tests.push(test); |
---|
24 | } |
---|
25 | } |
---|
26 | print(doh._line, "\n"); |
---|
27 | |
---|
28 | require(tests, function() { |
---|
29 | doh.run(); |
---|
30 | }); |
---|
31 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.