From fe48dfa4e640478bb596b333fce391ab4f6682fa Mon Sep 17 00:00:00 2001 From: AliMD Date: Sat, 30 Dec 2017 18:06:26 +0330 Subject: [PATCH] test(logging.html): #5007 make sure _logger called one time I really don't think its useful/necessary --- test/unit/logging.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/unit/logging.html b/test/unit/logging.html index a2942d9a66..a2c4ba68bc 100644 --- a/test/unit/logging.html +++ b/test/unit/logging.html @@ -88,16 +88,17 @@ suite('_logger', () => { test('_log with single parameter', () => { const msg = 'log test'; - let logedMsg; + const logHistory = []; const orgConsole = console; window.console = { log: msg => { - logedMsg = msg; + logHistory.push(msg); } }; Polymer.Base._log(msg); window.console = orgConsole; - assert.equal(msg, logedMsg); + assert.equal(logHistory[0], msg); + assert.equal(logHistory.length, 1, 'console.log called more than one time'); }); });