Skip to content

Commit

Permalink
test(reporters): Fix the log suppressing tests
Browse files Browse the repository at this point in the history
The tests ensuring a lower priority doesn't get logged were written in an
incorrect format so even changing the order in the LOG_PRIORITIES array
would not make them fail.
  • Loading branch information
mgol committed Apr 26, 2017
1 parent 03958ce commit ef62da9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/unit/reporters/base.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ describe('reporter', function () {

it('should not log if lower priority than browserConsoleLogOptions "error"', function () {
var reporter = new m.BaseReporter(null, null, true, {
browserConsoleLogOptions: {level: 'error'}
level: 'error',
terminal: true
}, adapter)
var writeSpy = sinon.spy(reporter, 'writeCommonMsg')

Expand All @@ -97,7 +98,8 @@ describe('reporter', function () {

it('should not log if lower priority than browserConsoleLogOptions "warn"', function () {
var reporter = new m.BaseReporter(null, null, true, {
browserConsoleLogOptions: {level: 'warn'}
level: 'warn',
terminal: true
}, adapter)
var writeSpy = sinon.spy(reporter, 'writeCommonMsg')

Expand All @@ -109,7 +111,8 @@ describe('reporter', function () {

it('should not log if lower priority than browserConsoleLogOptions "info"', function () {
var reporter = new m.BaseReporter(null, null, true, {
browserConsoleLogOptions: {level: 'info'}
level: 'info',
terminal: true
}, adapter)
var writeSpy = sinon.spy(reporter, 'writeCommonMsg')

Expand All @@ -121,7 +124,8 @@ describe('reporter', function () {

it('should not log if lower priority than browserConsoleLogOptions "debug"', function () {
var reporter = new m.BaseReporter(null, null, true, {
browserConsoleLogOptions: {level: 'debug'}
level: 'debug',
terminal: true
}, adapter)
var writeSpy = sinon.spy(reporter, 'writeCommonMsg')

Expand Down

0 comments on commit ef62da9

Please sign in to comment.