Skip to content

Commit

Permalink
added test for updated callback args
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Savery committed Mar 4, 2014
1 parent e06d39c commit 2ab251c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/Graph.spec.coffee
Expand Up @@ -301,6 +301,12 @@ describe "Traverse through each node", ->
callback = jasmine.createSpy()
graph.forEachNode callback
expect(callback.callCount).toBe 6
it "should pass nodeObject and nodeId to the callback", ->
callback = jasmine.createSpy()
graph.forEachNode callback
expect(callback.mostRecentCall.args.length).toBe 2
expect(callback.mostRecentCall.args[0] instanceof Object).toBeTruthy
expect(callback.mostRecentCall.args[1]).toBe "6"

describe "Traverse through each edge", ->
graph = new Graph()
Expand Down

0 comments on commit 2ab251c

Please sign in to comment.