protractor-console
Advanced tools
Comparing version 2.0.0 to 2.0.1
# Changelog | ||
## 2.0.1 | ||
##### Fixes | ||
* Don't print header when there are 0 results after filtering. | ||
## 2.0.0 | ||
@@ -4,0 +8,0 @@ ##### Breaking |
@@ -52,2 +52,4 @@ 'use strict'; | ||
return browser.manage().logs().get('browser').then(function (result) { | ||
result = result.filter(byLogLevel, config); | ||
if (result.length === 0) { | ||
@@ -59,3 +61,3 @@ return; | ||
(0, _lodash2['default'])(result).chain().filter(byLogLevel, config).reduce(group, {}).forEach(printLog, config).value(); | ||
(0, _lodash2['default'])(result).chain().reduce(group, {}).forEach(printLog, config).value(); | ||
}); | ||
@@ -62,0 +64,0 @@ } |
{ | ||
"name": "protractor-console", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Print console logging statements that occur during Protractor test runs.", | ||
@@ -5,0 +5,0 @@ "main": "dist/protractor-console.js", |
@@ -13,3 +13,3 @@ import sinon from 'sinon'; | ||
let reporter, context, printerSpy; | ||
let reporter, context, printerSpy, headerSpy; | ||
@@ -38,4 +38,4 @@ beforeEach(() => { | ||
// Not explicitly testing, just surpressing header output from test results | ||
context.config.headerPrinter = sinon.spy(); | ||
headerSpy = sinon.spy(); | ||
context.config.headerPrinter = headerSpy; | ||
}); | ||
@@ -45,2 +45,3 @@ | ||
printerSpy.reset(); | ||
headerSpy.reset(); | ||
}); | ||
@@ -54,2 +55,3 @@ | ||
expect(printerSpy).to.have.callCount(0); | ||
expect(headerSpy).to.have.callCount(0); | ||
@@ -61,2 +63,3 @@ context.config.logLevels = ['severe']; | ||
expect(printerSpy).to.have.callCount(1); | ||
expect(headerSpy).to.have.callCount(1); | ||
}); | ||
@@ -63,0 +66,0 @@ }); |
Sorry, the diff of this file is not supported yet
227
35190