Skip to content

Commit

Permalink
test(logging.html): #5007 make sure _logger called one time
Browse files Browse the repository at this point in the history
I really don't think its useful/necessary
  • Loading branch information
AliMD authored Dec 30, 2017
1 parent bd5821b commit fe48dfa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/unit/logging.html
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
});
</script>
Expand Down

0 comments on commit fe48dfa

Please sign in to comment.