-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Delete with CMD+Backspace - Delete with control button click
- Loading branch information
1 parent
6900ea6
commit 8fcd4a5
Showing
5 changed files
with
63 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Edge from "./edge"; | ||
import edge from "./edge"; | ||
|
||
describe("id", () => { | ||
test("should create an id from an edge", () => { | ||
const edge = { sourceId: "1", targetId: "2" }; | ||
expect(Edge.id(edge)).toEqual("1-->2"); | ||
}); | ||
}); | ||
|
||
describe("parseId", () => { | ||
test("should return an edge from an id", () => { | ||
const id = "1-->2"; | ||
expect(Edge.parseId(id)).toEqual({ sourceId: "1", targetId: "2" }); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters