mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Add tests for logging restricted keys.
This commit is contained in:
@@ -12,6 +12,13 @@ Tinytest.add("logging - log", function (test) {
|
||||
test.throws(function () {
|
||||
log({level: 'not the right level'});
|
||||
});
|
||||
_.each(['file', 'line', 'program', 'originApp'], function (restrictedKey) {
|
||||
test.throws(function () {
|
||||
var obj = {};
|
||||
obj[restrictedKey] = 'usage of restricted key';
|
||||
log(obj);
|
||||
});
|
||||
});
|
||||
|
||||
var intercepted = Log._intercepted();
|
||||
test.equal(intercepted.length, 3);
|
||||
|
||||
Reference in New Issue
Block a user