Skip to content

Commit

Permalink
test(config): test formatError option validation
Browse files Browse the repository at this point in the history
  • Loading branch information
levithomason committed Aug 30, 2016
1 parent 0088e2c commit 2c673da
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/unit/config.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,16 @@ describe('config', () => {

expect(invalid).to.throw('Invalid configuration: browsers option must be an array')
})

it('should validate that the formatError option is a function', () => {
var invalid = function () {
normalizeConfigWithDefaults({
formatError: 'lodash/identity'
})
}

expect(invalid).to.throw('Invalid configuration: formatError option must be a function.')
})
})

describe('createPatternObject', () => {
Expand Down

0 comments on commit 2c673da

Please sign in to comment.