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:
Hristo Hristov
2017-01-05 18:08:42 +02:00
committed by GitHub
parent ea92b12419
commit bfab188ba0
8 changed files with 226 additions and 209 deletions

View File

@@ -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;

View File

@@ -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> = [];