1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..114
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json Move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 102 JSONPatch should not mutate the source document
ok 103 JSONPatch should mutate the document if the mutate flag is true
ok 104 JSONPatch constructor should accept a JSON string as a patch
ok 105 JSONPatch constructor should accept a JS object as a patch
ok 106 JSONPatch constructor should raise an error for patches that arent arrays
ok 107 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 108 JSONPatch constructor should raise an error if an operation is not specified
ok 109 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 110 JSONPatch .apply() should call each operation in turn
ok 111 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 112 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 113 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 114 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 114
# pass 114
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
not ok 102 JSONPatch should mutate the document if the mutate flag is true
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 111
# fail 1
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements OK?
ok 4 tests.json rearrangements OK? How about one level down ... array
ok 5 tests.json rearrangements OK? How about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json Add, / target
ok 12 tests.json Add composite value at top level
ok 13 tests.json Add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json Empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json Move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json Adding to "/-" adds to the end of the array
ok 53 tests.json Adding to "/-" adds to the end of the array, even n levels down
ok 54 tests.json tests complete
ok 55 spec_tests.json 4.1. add with missing object
ok 56 spec_tests.json A.1. Adding an Object Member
ok 57 spec_tests.json A.2. Adding an Array Element
ok 58 spec_tests.json A.3. Removing an Object Member
ok 59 spec_tests.json A.4. Removing an Array Element
ok 60 spec_tests.json A.5. Replacing a Value
ok 61 spec_tests.json A.6. Moving a Value
ok 62 spec_tests.json A.7. Moving an Array Element
ok 63 spec_tests.json A.8. Testing a Value: Success
ok 64 spec_tests.json A.9. Testing a Value: Error
ok 65 spec_tests.json A.10. Adding a nested Member Object
ok 66 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 67 spec_tests.json A.12. Adding to a Non-existant Target
ok 68 spec_tests.json A.13 Invalid JSON Patch Document
ok 69 spec_tests.json A.14. ~ Escape Ordering
ok 70 spec_tests.json A.15. Comparing Strings and Numbers
ok 71 spec_tests.json A.16. Adding an Array Value
ok 72 JSONPointer .add() should add a element to an object
ok 73 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 74 JSONPointer .add() should allow adding to the end of an array
ok 75 JSONPointer .add() should allow adding to the end of an array
ok 76 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 77 JSONPointer .add() should should fail if the place to add specified does not exist
ok 78 JSONPointer .add() should should succeed when replacing the root
ok 79 JSONPointer .remove() should remove an object key
ok 80 JSONPointer .remove() should remove an item from an array
ok 81 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 82 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 83 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 84 JSONPointer .remove() should return undefined when removing the root
ok 85 JSONPointer .get() should get the object pointed to
ok 86 JSONPointer .get() should get the array element pointed to
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 100 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 101 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
not ok 102 JSONPatch should mutate the document if the mutate flag is true
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 111
# fail 1
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..110
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
not ok 100 JSONPatch should mutate the document if the mutate flag is true
ok 101 JSONPatch constructor should accept a JS object as a patch
ok 102 JSONPatch constructor should raise an error for patches that arent arrays
ok 103 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 104 JSONPatch constructor should raise an error if an operation is not specified
ok 105 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 106 JSONPatch .apply() should call each operation in turn
ok 107 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 108 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 109 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 110 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 110
# pass 109
# fail 1
1..110
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
not ok 100 JSONPatch should mutate the document if the mutate flag is true
ok 101 JSONPatch constructor should accept a JS object as a patch
ok 102 JSONPatch constructor should raise an error for patches that arent arrays
ok 103 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 104 JSONPatch constructor should raise an error if an operation is not specified
ok 105 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 106 JSONPatch .apply() should call each operation in turn
ok 107 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 108 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 109 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 110 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 110
# pass 109
# fail 1
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..110
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
not ok 100 JSONPatch should mutate the document if the mutate flag is true
ok 101 JSONPatch constructor should accept a JS object as a patch
ok 102 JSONPatch constructor should raise an error for patches that arent arrays
ok 103 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 104 JSONPatch constructor should raise an error if an operation is not specified
ok 105 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 106 JSONPatch .apply() should call each operation in turn
ok 107 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 108 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 109 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 110 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 110
# pass 109
# fail 1
1..110
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
not ok 100 JSONPatch should mutate the document if the mutate flag is true
ok 101 JSONPatch constructor should accept a JS object as a patch
ok 102 JSONPatch constructor should raise an error for patches that arent arrays
ok 103 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 104 JSONPatch constructor should raise an error if an operation is not specified
ok 105 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 106 JSONPatch .apply() should call each operation in turn
ok 107 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 108 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 109 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 110 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 110
# pass 109
# fail 1
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..110
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
not ok 100 JSONPatch should mutate the document if the mutate flag is true
ok 101 JSONPatch constructor should accept a JS object as a patch
ok 102 JSONPatch constructor should raise an error for patches that arent arrays
ok 103 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 104 JSONPatch constructor should raise an error if an operation is not specified
ok 105 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 106 JSONPatch .apply() should call each operation in turn
ok 107 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 108 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 109 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 110 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 110
# pass 109
# fail 1
1..110
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
not ok 100 JSONPatch should mutate the document if the mutate flag is true
ok 101 JSONPatch constructor should accept a JS object as a patch
ok 102 JSONPatch constructor should raise an error for patches that arent arrays
ok 103 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 104 JSONPatch constructor should raise an error if an operation is not specified
ok 105 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 106 JSONPatch .apply() should call each operation in turn
ok 107 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 108 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 109 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 110 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 110
# pass 109
# fail 1
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is true
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..110
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
not ok 100 JSONPatch should mutate the document if the mutate flag is true
ok 101 JSONPatch constructor should accept a JS object as a patch
ok 102 JSONPatch constructor should raise an error for patches that arent arrays
ok 103 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 104 JSONPatch constructor should raise an error if an operation is not specified
ok 105 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 106 JSONPatch .apply() should call each operation in turn
ok 107 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 108 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 109 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 110 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 110
# pass 109
# fail 1
1..110
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
not ok 100 JSONPatch should mutate the document if the mutate flag is true
ok 101 JSONPatch constructor should accept a JS object as a patch
ok 102 JSONPatch constructor should raise an error for patches that arent arrays
ok 103 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 104 JSONPatch constructor should raise an error if an operation is not specified
ok 105 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 106 JSONPatch .apply() should call each operation in turn
ok 107 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 108 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 109 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 110 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 110
# pass 109
# fail 1
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..110
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should mutate the document if the mutate flag is passed in
ok 101 JSONPatch constructor should accept a JS object as a patch
ok 102 JSONPatch constructor should raise an error for patches that arent arrays
ok 103 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 104 JSONPatch constructor should raise an error if an operation is not specified
ok 105 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 106 JSONPatch .apply() should call each operation in turn
ok 107 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 108 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 109 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 110 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 110
# pass 110
# fail 0
1..110
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should mutate the document if the mutate flag is passed in
ok 101 JSONPatch constructor should accept a JS object as a patch
ok 102 JSONPatch constructor should raise an error for patches that arent arrays
ok 103 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 104 JSONPatch constructor should raise an error if an operation is not specified
ok 105 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 106 JSONPatch .apply() should call each operation in turn
ok 107 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 108 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 109 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 110 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 110
# pass 110
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..110
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should mutate the document if the mutate flag is passed in
ok 101 JSONPatch constructor should accept a JS object as a patch
ok 102 JSONPatch constructor should raise an error for patches that arent arrays
ok 103 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 104 JSONPatch constructor should raise an error if an operation is not specified
ok 105 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 106 JSONPatch .apply() should call each operation in turn
ok 107 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 108 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 109 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 110 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 110
# pass 110
# fail 0
1..110
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should mutate the document if the mutate flag is passed in
ok 101 JSONPatch constructor should accept a JS object as a patch
ok 102 JSONPatch constructor should raise an error for patches that arent arrays
ok 103 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 104 JSONPatch constructor should raise an error if an operation is not specified
ok 105 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 106 JSONPatch .apply() should call each operation in turn
ok 107 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 108 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 109 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 110 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 110
# pass 110
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..110
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should mutate the document if the mutate flag is passed in
ok 101 JSONPatch constructor should accept a JS object as a patch
ok 102 JSONPatch constructor should raise an error for patches that arent arrays
ok 103 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 104 JSONPatch constructor should raise an error if an operation is not specified
ok 105 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 106 JSONPatch .apply() should call each operation in turn
ok 107 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 108 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 109 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 110 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 110
# pass 110
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..110
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should mutate the document if the mutate flag is passed in
ok 101 JSONPatch constructor should accept a JS object as a patch
ok 102 JSONPatch constructor should raise an error for patches that arent arrays
ok 103 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 104 JSONPatch constructor should raise an error if an operation is not specified
ok 105 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 106 JSONPatch .apply() should call each operation in turn
ok 107 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 108 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 109 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 110 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 110
# pass 110
# fail 0
1..110
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should mutate the document if the mutate flag is passed in
ok 101 JSONPatch constructor should accept a JS object as a patch
ok 102 JSONPatch constructor should raise an error for patches that arent arrays
ok 103 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 104 JSONPatch constructor should raise an error if an operation is not specified
ok 105 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 106 JSONPatch .apply() should call each operation in turn
ok 107 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 108 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 109 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 110 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 110
# pass 110
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..112
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json [{"op":"add","path":"/bar/8","value":"5"}]
ok 15 tests.json [{"op":"add","path":"/bar/-1","value":"5"}]
ok 16 tests.json [{"op":"add","path":"/bar","value":true}]
ok 17 tests.json [{"op":"add","path":"/bar","value":false}]
ok 18 tests.json [{"op":"add","path":"/bar","value":null}]
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 21 tests.json [{"op":"add","path":"/1","value":"bar"}]
ok 22 tests.json [{"op":"add","path":"/0","value":"bar"}]
ok 23 tests.json [{"op":"add","path":"/2","value":"bar"}]
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json [{"op":"add","path":"/bar","value":42}]
ok 27 tests.json value in array add not flattened
ok 28 tests.json [{"op":"remove","path":"/bar"}]
ok 29 tests.json [{"op":"remove","path":"/baz/0/qux"}]
ok 30 tests.json [{"op":"replace","path":"/foo","value":[1,2,3,4]}]
ok 31 tests.json [{"op":"replace","path":"/baz/0/qux","value":"world"}]
ok 32 tests.json [{"op":"replace","path":"/0","value":"bar"}]
ok 33 tests.json [{"op":"replace","path":"/0","value":0}]
ok 34 tests.json [{"op":"replace","path":"/0","value":true}]
ok 35 tests.json [{"op":"replace","path":"/0","value":false}]
ok 36 tests.json [{"op":"replace","path":"/0","value":null}]
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json [{"op":"test","path":"/foo","value":[1,2]}]
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json [{"op":"test","path":"/foo","value":["bar","baz"]},{"op":"test","path":"/foo/0","value":"bar"},{"op":"test","path":"/","value":0},{"op":"test","path":"/a~1b","value":1},{"op":"test","path":"/c%d","value":2},{"op":"test","path":"/e^f","value":3},{"op":"test","path":"/g|h","value":4},{"op":"test","path":"/i\\j","value":5},{"op":"test","path":"/k\"l","value":6},{"op":"test","path":"/ ","value":7},{"op":"test","path":"/m~0n","value":8}]
ok 47 tests.json move to same location has no effect
ok 48 tests.json [{"op":"move","from":"/foo","path":"/bar"}]
ok 49 tests.json [{"op":"move","from":"/baz/0/qux","path":"/baz/1"}]
ok 50 tests.json [{"op":"copy","from":"/baz/0","path":"/boo"}]
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch should mutate the document if the mutate flag is passed in
ok 102 JSONPatch constructor should accept a JSON string as a patch
ok 103 JSONPatch constructor should accept a JS object as a patch
ok 104 JSONPatch constructor should raise an error for patches that arent arrays
ok 105 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 106 JSONPatch constructor should raise an error if an operation is not specified
ok 107 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 108 JSONPatch .apply() should call each operation in turn
ok 109 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 110 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 111 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 112 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 112
# pass 112
# fail 0
1..110
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should mutate the document if the mutate flag is passed in
ok 101 JSONPatch constructor should accept a JS object as a patch
ok 102 JSONPatch constructor should raise an error for patches that arent arrays
ok 103 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 104 JSONPatch constructor should raise an error if an operation is not specified
ok 105 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 106 JSONPatch .apply() should call each operation in turn
ok 107 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 108 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 109 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 110 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 110
# pass 110
# fail 0
1..110
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named patch
ok 15 tests.json Un-named patch
ok 16 tests.json Un-named patch
ok 17 tests.json Un-named patch
ok 18 tests.json Un-named patch
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named patch
ok 21 tests.json Un-named patch
ok 22 tests.json Un-named patch
ok 23 tests.json Un-named patch
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named patch
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named patch
ok 29 tests.json Un-named patch
ok 30 tests.json Un-named patch
ok 31 tests.json Un-named patch
ok 32 tests.json Un-named patch
ok 33 tests.json Un-named patch
ok 34 tests.json Un-named patch
ok 35 tests.json Un-named patch
ok 36 tests.json Un-named patch
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named patch
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named patch
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named patch
ok 49 tests.json Un-named patch
ok 50 tests.json Un-named patch
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should mutate the document if the mutate flag is passed in
ok 101 JSONPatch constructor should accept a JS object as a patch
ok 102 JSONPatch constructor should raise an error for patches that arent arrays
ok 103 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 104 JSONPatch constructor should raise an error if an operation is not specified
ok 105 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 106 JSONPatch .apply() should call each operation in turn
ok 107 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 108 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 109 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 110 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 110
# pass 110
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..109
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch constructor should accept a JS object as a patch
ok 101 JSONPatch constructor should raise an error for patches that arent arrays
ok 102 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 103 JSONPatch constructor should raise an error if an operation is not specified
ok 104 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 105 JSONPatch .apply() should call each operation in turn
ok 106 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 107 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 108 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 109 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 109
# pass 109
# fail 0
1..109
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch constructor should accept a JS object as a patch
ok 101 JSONPatch constructor should raise an error for patches that arent arrays
ok 102 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 103 JSONPatch constructor should raise an error if an operation is not specified
ok 104 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 105 JSONPatch .apply() should call each operation in turn
ok 106 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 107 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 108 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 109 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 109
# pass 109
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..109
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch constructor should accept a JS object as a patch
ok 101 JSONPatch constructor should raise an error for patches that arent arrays
ok 102 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 103 JSONPatch constructor should raise an error if an operation is not specified
ok 104 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 105 JSONPatch .apply() should call each operation in turn
ok 106 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 107 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 108 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 109 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 109
# pass 109
# fail 0
1..109
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch constructor should accept a JS object as a patch
ok 101 JSONPatch constructor should raise an error for patches that arent arrays
ok 102 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 103 JSONPatch constructor should raise an error if an operation is not specified
ok 104 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 105 JSONPatch .apply() should call each operation in turn
ok 106 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 107 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 108 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 109 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 109
# pass 109
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..109
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch constructor should accept a JS object as a patch
ok 101 JSONPatch constructor should raise an error for patches that arent arrays
ok 102 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 103 JSONPatch constructor should raise an error if an operation is not specified
ok 104 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 105 JSONPatch .apply() should call each operation in turn
ok 106 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 107 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 108 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 109 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 109
# pass 109
# fail 0
1..109
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch constructor should accept a JS object as a patch
ok 101 JSONPatch constructor should raise an error for patches that arent arrays
ok 102 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 103 JSONPatch constructor should raise an error if an operation is not specified
ok 104 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 105 JSONPatch .apply() should call each operation in turn
ok 106 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 107 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 108 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 109 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 109
# pass 109
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..109
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch constructor should accept a JS object as a patch
ok 101 JSONPatch constructor should raise an error for patches that arent arrays
ok 102 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 103 JSONPatch constructor should raise an error if an operation is not specified
ok 104 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 105 JSONPatch .apply() should call each operation in turn
ok 106 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 107 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 108 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 109 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 109
# pass 109
# fail 0
1..109
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch constructor should accept a JS object as a patch
ok 101 JSONPatch constructor should raise an error for patches that arent arrays
ok 102 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 103 JSONPatch constructor should raise an error if an operation is not specified
ok 104 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 105 JSONPatch .apply() should call each operation in turn
ok 106 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 107 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 108 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 109 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 109
# pass 109
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0
1..111
ok 1 tests.json empty list, empty docs
ok 2 tests.json empty patch list
ok 3 tests.json rearrangements ok?
ok 4 tests.json rearrangements ok? how about one level down ... array
ok 5 tests.json rearrangements ok? how about one level down...
ok 6 tests.json add replaces any existing field
ok 7 tests.json toplevel array
ok 8 tests.json toplevel array, no change
ok 9 tests.json toplevel object, numeric string
ok 10 tests.json toplevel object, integer
ok 11 tests.json add, / target
ok 12 tests.json add composite value at top level
ok 13 tests.json add into composite value
ok 14 tests.json Un-named test
ok 15 tests.json Un-named test
ok 16 tests.json Un-named test
ok 17 tests.json Un-named test
ok 18 tests.json Un-named test
ok 19 tests.json 0 can be an array index or object element name
ok 20 tests.json Un-named test
ok 21 tests.json Un-named test
ok 22 tests.json Un-named test
ok 23 tests.json Un-named test
ok 24 tests.json test against implementation-specific numeric parsing
ok 25 tests.json test with bad number should fail
ok 26 tests.json Un-named test
ok 27 tests.json value in array add not flattened
ok 28 tests.json Un-named test
ok 29 tests.json Un-named test
ok 30 tests.json Un-named test
ok 31 tests.json Un-named test
ok 32 tests.json Un-named test
ok 33 tests.json Un-named test
ok 34 tests.json Un-named test
ok 35 tests.json Un-named test
ok 36 tests.json Un-named test
ok 37 tests.json value in array replace not flattened
ok 38 tests.json spurious patch properties
ok 39 tests.json null value should still be valid obj property
ok 40 tests.json test should pass despite rearrangement
ok 41 tests.json test should pass despite (nested) rearrangement
ok 42 tests.json test should pass - no error
ok 43 tests.json Un-named test
ok 44 tests.json json-pointer tests
ok 45 tests.json empty-string element
ok 46 tests.json Un-named test
ok 47 tests.json move to same location has no effect
ok 48 tests.json Un-named test
ok 49 tests.json Un-named test
ok 50 tests.json Un-named test
ok 51 tests.json replacing the root of the document is possible with add
ok 52 tests.json tests complete
ok 53 spec_tests.json 4.1. add with missing object
ok 54 spec_tests.json A.1. Adding an Object Member
ok 55 spec_tests.json A.2. Adding an Array Element
ok 56 spec_tests.json A.3. Removing an Object Member
ok 57 spec_tests.json A.4. Removing an Array Element
ok 58 spec_tests.json A.5. Replacing a Value
ok 59 spec_tests.json A.6. Moving a Value
ok 60 spec_tests.json A.7. Moving an Array Element
ok 61 spec_tests.json A.8. Testing a Value: Success
ok 62 spec_tests.json A.9. Testing a Value: Error
ok 63 spec_tests.json A.10. Adding a nested Member Object
ok 64 spec_tests.json A.11. Ignoring Unrecognized Elements
ok 65 spec_tests.json A.12. Adding to a Non-existant Target
ok 66 spec_tests.json A.13 Invalid JSON Patch Document
ok 67 spec_tests.json A.14. ~ Escape Ordering
ok 68 spec_tests.json A.15. Comparing Strings and Numbers
ok 69 spec_tests.json A.16. Adding an Array Value
ok 70 JSONPointer .add() should add a element to an object
ok 71 JSONPointer .add() should add an element to list, pushing up the remaing values
ok 72 JSONPointer .add() should allow adding to the end of an array
ok 73 JSONPointer .add() should allow adding to the end of an array
ok 74 JSONPointer .add() should fail if adding to an array would create a sparse array
ok 75 JSONPointer .add() should should fail if the place to add specified does not exist
ok 76 JSONPointer .add() should should succeed when replacing the root
ok 77 JSONPointer .remove() should remove an object key
ok 78 JSONPointer .remove() should remove an item from an array
ok 79 JSONPointer .remove() should fail if the object key specified doesnt exist
ok 80 JSONPointer .remove() should should fail if the path specified doesnt exist
ok 81 JSONPointer .remove() should fail if the array element specified doesnt exist
ok 82 JSONPointer .remove() should return undefined when removing the root
ok 83 JSONPointer .get() should get the object pointed to
ok 84 JSONPointer .get() should get the array element pointed to
ok 85 JSONPointer .get() JSONPointer examples should get the correct pointed object for example ""
ok 86 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo"
ok 87 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/foo/0"
ok 88 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/"
ok 89 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/a~1b"
ok 90 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/c%d"
ok 91 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/e^f"
ok 92 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/g|h"
ok 93 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/i\j"
ok 94 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/k"l"
ok 95 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/ "
ok 96 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/m~0n"
ok 97 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/010"
ok 98 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/00010"
ok 99 JSONPointer .get() JSONPointer examples should get the correct pointed object for example "/numbers/-"
ok 100 JSONPatch should not mutate the source document
ok 101 JSONPatch constructor should accept a JSON string as a patch
ok 102 JSONPatch constructor should accept a JS object as a patch
ok 103 JSONPatch constructor should raise an error for patches that arent arrays
ok 104 JSONPatch constructor should raise an error if value is not supplied for add or replace operation
ok 105 JSONPatch constructor should raise an error if an operation is not specified
ok 106 JSONPatch constructor should raise an error if un-recognised operation is specified
ok 107 JSONPatch .apply() should call each operation in turn
ok 108 JSONPatch path attribute MUST NOT be part of the location specified by "from" in a move operation
ok 109 JSONPatch path attribute MUST ALLOW source to start with the destinations string as long as one is not actually a subset of the other
ok 110 JSONPatch Regressions should reject unknown patch operations (even if they are properties of the base Object)
ok 111 JSONPatch Atomicity should not apply the patch if any of the operations fails, and the original object should be unaffected
# tests 111
# pass 111
# fail 0