mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-04-13 06:02:57 +00:00
Fix typo in constructor
This commit is contained in:
parent
5549a2bd9e
commit
86548fc3d2
lib/errors
@ -2,7 +2,7 @@ TypedError = require('typed-error')
|
||||
log = require('../log/log')
|
||||
|
||||
exports.NotFound = class NotFound extends TypedError
|
||||
contructor: (name) ->
|
||||
constructor: (name) ->
|
||||
@message = "Couldn't find #{name}"
|
||||
|
||||
exports.handle = (error, exit = true) ->
|
||||
|
@ -47,3 +47,11 @@ describe 'Errors:', ->
|
||||
it 'should not exit if the last parameter is false', ->
|
||||
checkProcessExitOption false, (processExitStub) ->
|
||||
expect(processExitStub).to.not.have.been.called
|
||||
|
||||
describe 'NotFound', ->
|
||||
|
||||
it 'should get a custom message', ->
|
||||
message = 'Foo'
|
||||
error = new errors.NotFound(message)
|
||||
expect(error.message).to.not.equal(message)
|
||||
expect(error.message).to.contain(message)
|
||||
|
Loading…
x
Reference in New Issue
Block a user