l.warn -> l.debug for formatter warning (#151)

* l.warn -> l.debug for formatter

* Debug with function

* Fix console spy
This commit is contained in:
Jaco Greeff
2018-09-12 14:25:13 +02:00
committed by GitHub
parent 2e9393bc43
commit e1e46bd0e9
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ describe('format', () => {
beforeEach(() => {
echoSpy = jest.fn(echo);
warnSpy = jest.spyOn(console, 'warn');
warnSpy = jest.spyOn(console, 'log');
formatters = new Map([
['Address', echoSpy],
+1 -1
View File
@@ -28,7 +28,7 @@ function formatSingleType (formatters: FormattersFunctionMap, type: Param$Types,
const formatter = formatters.get(type);
if (isUndefined(formatter)) {
l.warn(`Unable to find default formatter for '${typeToString(type)}', falling back to echo`);
l.debug(() => `Unable to find default formatter for '${typeToString(type)}', falling back to echo`);
return echo(value);
}