Skip to content

Commit

Permalink
test(logging): _log with single parameter #5007
Browse files Browse the repository at this point in the history
Make @TimvdLippe happy ;)
  • Loading branch information
AliMD authored Dec 30, 2017
1 parent e0affe3 commit 818c537
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion test/unit/logging.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,19 @@
assert.deepEqual(fnEl.stream, [{level: 'log', args: ['fn']}, {level: 'warn', args: ['fn']}, {level: 'error', args: ['fn']}]);
assert.deepEqual(classEl.stream, [{level: 'log', args: ['class']}, {level: 'warn', args: ['class']}, {level: 'error', args: ['class']}]);
});
test('_log with single parameter', () => {
const msg = 'log test';
let logedMsg;
const orgConsole = console;
window.console = {
log: msg => {
logedMsg = msg
}
};
Polymer.Base._log(msg);
window.console = orgConsole;
assert.equal(msg, logedMsg);
});
test('_logf', () => {
let args = ['hi', 'there'];
let output = fnEl._logf(...args);
Expand All @@ -87,4 +100,4 @@
});
</script>
</body>
</html>
</html>

0 comments on commit 818c537

Please sign in to comment.