Skip to content

Commit

Permalink
Cleaned up worker tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Bassett committed Mar 25, 2012
1 parent 0baa039 commit 81bee82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/worker_test.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe "Worker", ->
worker.registerTask "reverse", Reverse
worker.tasks.reverse.should.eql Reverse

it "should send the result when a task completes", (done) ->
it "should send a completed response when a task is completed", (done) ->
worker.registerTask "reverse", Reverse
socket.send JSON.stringify(id: 123, request: "reverse", data: "hello")
socket.on "message", (payload) ->
Expand All @@ -38,7 +38,7 @@ describe "Worker", ->
data.should.eql "olleh"
done()

it "should send the error when a task fails", (done) ->
it "should send a failed response when a task failed", (done) ->
worker.registerTask "reverse", Fail
socket.send JSON.stringify(id: 123, request: "reverse", data: "hello")
socket.on "message", (payload) ->
Expand Down

0 comments on commit 81bee82

Please sign in to comment.