Skip to content

Commit 2986c5a

Browse files
Test for trailing slash when not the root element
The existing test covers the trailing slash at only the root node.
1 parent c91f7e8 commit 2986c5a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests.json

+5
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@
6060
"patch": [ {"op": "add", "path": "/", "value":1 } ],
6161
"expected": {"":1} },
6262

63+
{ "comment": "Add, /foo/ deep target (trailing slash)",
64+
"doc": {"foo": {}},
65+
"patch": [ {"op": "add", "path": "/foo/", "value":1 } ],
66+
"expected": {"foo":{"": 1}} },
67+
6368
{ "comment": "Add composite value at top level",
6469
"doc": {"foo": 1},
6570
"patch": [{"op": "add", "path": "/bar", "value": [1, 2]}],

0 commit comments

Comments
 (0)