mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Imrove comments, clean intercept counter in logging package at the same
place we reset the intercepted array.
This commit is contained in:
@@ -16,6 +16,7 @@ Log._intercept = function (count) {
|
||||
Log._intercepted = function () {
|
||||
var lines = interceptedLines;
|
||||
interceptedLines = [];
|
||||
intercept = 0;
|
||||
return lines;
|
||||
};
|
||||
|
||||
|
||||
@@ -108,12 +108,9 @@ Tinytest.add("logging - log", function (test) {
|
||||
});
|
||||
});
|
||||
|
||||
// Since everything above throws, it shouldn't print anything,
|
||||
// It clears the intercepted array as well.
|
||||
// Since all tests above should throw, nothing should be printed.
|
||||
// This call will set the logging interception to the clean state as well.
|
||||
test.equal(Log._intercepted().length, 0);
|
||||
// Put counter back to 0.
|
||||
// It didn't move and empty intercepted list proves it.
|
||||
Log._intercept(-throwingTestcases.length);
|
||||
};
|
||||
|
||||
logBothMessageAndObject(Log, 'info');
|
||||
|
||||
Reference in New Issue
Block a user