Skip to content

Commit db89a19

Browse files
authored
add unit test to document (counter-intutive?) collectAll path-tracking behavior (#360)
* add unit test to document (counter-intutive?) collectAll path-tracking behavior
1 parent 7226b04 commit db89a19

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

traversal-tests/src/test/scala/overflowdb/traversal/PathTraversalTests.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ class PathTraversalTests extends AnyWordSpec with ExampleGraphSetup {
5757
Seq(center, r1, "R1"))
5858
}
5959

60+
"collectAll: includes intermediate results (this behavior is undesired)" in {
61+
centerTrav.enablePathTracking.collectAll[Thing].path.toList shouldBe List(
62+
Seq(center, center))
63+
}
64+
6065
"filter" in {
6166
centerTrav.enablePathTracking.followedBy.nameStartsWith("R").followedBy.path.toSetMutable shouldBe Set(
6267
Seq(center, r1, r2))

0 commit comments

Comments
 (0)