Skip to content

Commit

Permalink
Test for multi-edge key
Browse files Browse the repository at this point in the history
  • Loading branch information
cpettitt committed Sep 24, 2014
1 parent 8fe39e6 commit df6f95b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/graph-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@ describe("Graph", function() {
expect(g.edge(abKey)).to.equal(ab);
expect(g.hasEdge(abKey)).to.be.true;
});

it("also generates multi-edge keys", function() {
var g = new Graph({ multigraph: true }),
ab = g.edge("a", "b", "foo"),
abKey = g.edgeKey("a", "b", "foo");
expect(g.edge(abKey)).to.equal(ab);
expect(g.hasEdge(abKey)).to.be.true;
});
});

describe("edges", function() {
Expand Down

0 comments on commit df6f95b

Please sign in to comment.