Skip to content

Commit

Permalink
Merge pull request #54 from Runnable/update-error-cat-3
Browse files Browse the repository at this point in the history
  • Loading branch information
bkendall authored Jun 15, 2016
2 parents dd9f8eb + bd9ea28 commit 27432c0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion interfaces/modules/error-cat.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ declare module 'error-cat' {
}

declare class WorkerStopError extends Error {
static constructor(message: string, data?: Object, queue?: string, job: Object): WorkerStopError;
static constructor(message: string, data?: Object, reporting?: Object, queue?: string, job?: Object): WorkerStopError;
}

declare module 'error-cat/errors/worker-stop-error' {
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,15 @@
"afterEach"
]
},
"peerDependencies": {
"error-cat": "^3.0.0"
},
"dependencies": {
"101": "^1.1.1",
"amqplib": "^0.4.1",
"bluebird": "^3.0.5",
"bunyan": "^1.5.1",
"error-cat": "^2.0.4",
"error-cat": "^3.0.0",
"immutable": "^3.8.1",
"monitor-dog": "1.5.0",
"uuid": "^2.0.2"
Expand Down
2 changes: 2 additions & 0 deletions test/unit/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@ describe('Worker', () => {
const stopError = new WorkerStopError(
'my message',
{ dog: 'robot' },
{ level: 'info' },
'some.queue',
{ foo: 'bar' }
)
Expand All @@ -632,6 +633,7 @@ describe('Worker', () => {
.then(() => {
const decoratedError = worker._reportError.firstCall.args[0]
assert.deepEqual(decoratedError, stopError)
assert.deepEqual(decoratedError.reporting, { level: 'info' })
assert.deepEqual(decoratedError.data.queue, 'some.queue')
assert.deepEqual(decoratedError.data.job, { foo: 'bar' })
})
Expand Down

0 comments on commit 27432c0

Please sign in to comment.