From f75730e3c4d790b53effeafda7df0f37e5408b45 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Wed, 29 May 2013 12:29:19 -0700 Subject: [PATCH] Add tests for logging restricted keys. --- packages/logging/logging_test.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/logging/logging_test.js b/packages/logging/logging_test.js index 7514891274..85d95ba397 100644 --- a/packages/logging/logging_test.js +++ b/packages/logging/logging_test.js @@ -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);