Skip to content

Commit

Permalink
add option to not print test times (#80)
Browse files Browse the repository at this point in the history
* add option to not print test times

* fix(build): fixes build issue
  • Loading branch information
georgejecook authored Jan 21, 2020
1 parent 6066fd0 commit 485b87c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"minami": "^1.2.3",
"roku-deploy": "^2.0.0",
"rooibos-cli": "^1.0.1",
"typescript": "^3.3.1",
"typescript": "3.7.4",
"vinyl-paths": "^2.1.0"
},
"scripts": {
Expand Down
10 changes: 8 additions & 2 deletions src/TestLogger.bs
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,16 @@ public sub PrintTestStatistic(testCase as object)
end if
locationText = "pkg:/" + testCase.filePath.trim() + "(" + locationLine + ")"

if m.config.printTestTimes = true
timeText = " (" + stri(metaTestCase.time).trim() +"ms)"
else
timeText = ""
end if

insetText = ""
if (metaTestcase.isParamTest <> true)
messageLine = RBS_LOGGER_FillText(" " + testChar + " |--" + metaTestCase.Name + " : ", ".", 80)
? messageLine ; testCase.Result ; " (" + stri(metaTestCase.time).trim() +"ms)"
? messageLine ; testCase.Result ; timeText
else if ( metaTestcase.paramTestIndex = 0)
name = metaTestCase.Name
if (len(name) > 1 and right(name, 1) = "0")
Expand All @@ -107,7 +113,7 @@ public sub PrintTestStatistic(testCase as object)
if (metaTestcase.isParamTest = true)
insetText = " "
messageLine = m.fillText(" " + testChar + insetText + " |--" + formatJson(metaTestCase.rawParams) + " : ", ".", 80)
? messageLine ; testCase.Result ; " (" + stri(metaTestCase.time).trim() +"ms)"
? messageLine ; testCase.Result ; timeText
end if

if LCase(testCase.Result) <> "success"
Expand Down

0 comments on commit 485b87c

Please sign in to comment.