Skip to content

Commit

Permalink
_loggertest(logging.html): make seperate test suite for _logger
Browse files Browse the repository at this point in the history
  • Loading branch information
AliMD authored Dec 30, 2017
1 parent df3c3c0 commit bd5821b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/unit/logging.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@
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('_logf', () => {
let args = ['hi', 'there'];
let output = fnEl._logf(...args);
assert.oneOf(fnEl.is, output, `${fnEl.is} should be in ${output}`);
assert.includeMembers(output, args, `${args} should be in ${output}`);
});
});
suite('_logger', () => {
test('_log with single parameter', () => {
const msg = 'log test';
let logedMsg;
Expand All @@ -91,12 +99,6 @@
window.console = orgConsole;
assert.equal(msg, logedMsg);
});
test('_logf', () => {
let args = ['hi', 'there'];
let output = fnEl._logf(...args);
assert.oneOf(fnEl.is, output, `${fnEl.is} should be in ${output}`);
assert.includeMembers(output, args, `${args} should be in ${output}`);
});
});
</script>
</body>
Expand Down

0 comments on commit bd5821b

Please sign in to comment.