mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
clear nativeView field. (#3418)
moved some native setters from TabView to TabViewItem. shorthand properties converters now accounts for unsetValue. better formatting for test duration.
This commit is contained in:
@@ -49,7 +49,7 @@ export var write = function write(message: string, type?: number) {
|
||||
|
||||
var runTest = function (testInfo: TestInfoEntry) {
|
||||
let start = time();
|
||||
let duration;
|
||||
let duration: number;
|
||||
try {
|
||||
if (testInfo.instance) {
|
||||
testInfo.testFunc.apply(testInfo.instance);
|
||||
@@ -59,7 +59,7 @@ var runTest = function (testInfo: TestInfoEntry) {
|
||||
}
|
||||
|
||||
if (testInfo.isTest) {
|
||||
duration = time() - start;
|
||||
duration = (time() - start).toFixed(2);
|
||||
testInfo.duration = duration;
|
||||
write(`--- [${testInfo.testName}] OK, duration: ${duration}`, trace.messageType.info);
|
||||
testInfo.isPassed = true;
|
||||
@@ -67,7 +67,7 @@ var runTest = function (testInfo: TestInfoEntry) {
|
||||
}
|
||||
catch (e) {
|
||||
if (testInfo.isTest) {
|
||||
duration = time() - start;
|
||||
duration = (time() - start).toFixed(2);
|
||||
testInfo.duration = duration;
|
||||
write(`--- [${testInfo.testName}] FAILED: ${e.message}, Stack: ${e.stack}, duration: ${duration}`, trace.messageType.error);
|
||||
testInfo.isPassed = false;
|
||||
|
||||
@@ -210,7 +210,7 @@ function startLog(): void {
|
||||
function log(): void {
|
||||
let testsName: string = this.name;
|
||||
let duration = TKUnit.time() - this.start;
|
||||
TKUnit.write(testsName + " COMPLETED for " + duration + " BACKSTACK DEPTH: " + topmost().backStack.length, messageType.info);
|
||||
TKUnit.write(testsName + " COMPLETED for " + duration.toFixed(2) + " BACKSTACK DEPTH: " + topmost().backStack.length, messageType.info);
|
||||
}
|
||||
|
||||
let testsSelector: string
|
||||
@@ -243,7 +243,7 @@ export var runAll = function (testSelector?: string) {
|
||||
}
|
||||
}
|
||||
|
||||
console.log("TESTS: " + singleModuleName + " " + singleTestName);
|
||||
console.log("TESTS: " + singleModuleName ? singleModuleName : "" + " " + singleTestName ? singleTestName : "");
|
||||
|
||||
var totalSuccess = 0;
|
||||
var totalFailed: Array<TKUnit.TestFailure> = [];
|
||||
|
||||
Reference in New Issue
Block a user