Browse Source

[test] shows file name and line number as usual trace in JS unit test

Andy Li 7 years ago
parent
commit
bbfe3cf649
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tests/unit/src/unit/TestMain.hx

+ 1 - 1
tests/unit/src/unit/TestMain.hx

@@ -27,7 +27,7 @@ class TestMain {
 			var traceElement = js.Browser.document.getElementById("haxe:trace");
 			haxe.Log.trace = function(v, ?infos) {
 				oTrace(v, infos);
-				traceElement.innerHTML += StringTools.htmlEscape(v) + "<br/>";
+				traceElement.innerHTML += infos.fileName + ":" + infos.lineNumber + ": " + StringTools.htmlEscape(v) + "<br/>";
 			}
 		}
 		#end