mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 05:18:39 +08:00
improved unit test reporting
This commit is contained in:
@ -10,11 +10,16 @@ allTests["IMAGE SOURCE"] = require("Tests/image-source-tests");
|
||||
allTests["TIMER"] = require("Tests/timer-tests");
|
||||
|
||||
export var runAll = function (moduleName?: string) {
|
||||
var totalSuccess = 0;
|
||||
var totalFailed = 0;
|
||||
for (var name in allTests) {
|
||||
if(moduleName && (moduleName.toLowerCase() !== name.toLowerCase())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
TKUnit.runTestModule(allTests[name], name);
|
||||
var result = TKUnit.runTestModule(allTests[name], name);
|
||||
totalSuccess += result.success;
|
||||
totalFailed += result.failed;
|
||||
}
|
||||
console.info("=== ALL TESTS COMPLETE === " + totalSuccess + " OK, " + totalFailed + " failed")
|
||||
}
|
||||
|
Reference in New Issue
Block a user