@@ -71,56 +71,6 @@ describe('evaluate', function () {
7171 } ) ;
7272 } ) ;
7373
74- context ( 'valid JSON Pointers' , function ( ) {
75- specify ( 'should return entire document for ""' , function ( ) {
76- assert . deepEqual ( evaluate ( data , '' , { realm } ) , data ) ;
77- } ) ;
78-
79- specify ( 'should return Set(["bar", "baz"]) for "/foo"' , function ( ) {
80- assert . deepEqual ( evaluate ( data , '/foo' , { realm } ) , new Set ( [ 'bar' , 'baz' ] ) ) ;
81- } ) ;
82-
83- specify ( 'should return "bar" for "/foo/0"' , function ( ) {
84- assert . strictEqual ( evaluate ( data , '/foo/0' , { realm } ) , 'bar' ) ;
85- } ) ;
86-
87- specify ( 'should return 0 for "/"' , function ( ) {
88- assert . strictEqual ( evaluate ( data , '/' , { realm } ) , 0 ) ;
89- } ) ;
90-
91- specify ( 'should return 1 for "/a~1b"' , function ( ) {
92- assert . strictEqual ( evaluate ( data , '/a~1b' , { realm } ) , 1 ) ;
93- } ) ;
94-
95- specify ( 'should return 2 for "/c%d"' , function ( ) {
96- assert . strictEqual ( evaluate ( data , '/c%d' , { realm } ) , 2 ) ;
97- } ) ;
98-
99- specify ( 'should return 3 for "/e^f"' , function ( ) {
100- assert . strictEqual ( evaluate ( data , '/e^f' , { realm } ) , 3 ) ;
101- } ) ;
102-
103- specify ( 'should return 4 for "/g|h"' , function ( ) {
104- assert . strictEqual ( evaluate ( data , '/g|h' , { realm } ) , 4 ) ;
105- } ) ;
106-
107- specify ( 'should return 5 for "/i\\j"' , function ( ) {
108- assert . strictEqual ( evaluate ( data , '/i\\j' , { realm } ) , 5 ) ;
109- } ) ;
110-
111- specify ( 'should return 6 for "/k\"l"' , function ( ) {
112- assert . strictEqual ( evaluate ( data , '/k"l' , { realm } ) , 6 ) ;
113- } ) ;
114-
115- specify ( 'should return 7 for "/ "' , function ( ) {
116- assert . strictEqual ( evaluate ( data , '/ ' , { realm } ) , 7 ) ;
117- } ) ;
118-
119- specify ( 'should return 8 for "/m~0n"' , function ( ) {
120- assert . strictEqual ( evaluate ( data , '/m~0n' , { realm } ) , 8 ) ;
121- } ) ;
122- } ) ;
123-
12474 context ( 'invalid JSON Pointers (should throw errors)' , function ( ) {
12575 specify ( 'should throw JSONPointerEvaluateError for invalid JSON Pointer' , function ( ) {
12676 assert . throws ( ( ) => evaluate ( data , 'invalid-pointer' , { realm } ) , JSONPointerEvaluateError ) ;
0 commit comments