forked from jaystack/odata-v4-parser
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
149 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Filter Test Suite shuold support filter with double quote 1`] = `"$filter=key eq 'val\\"'"`; | ||
|
||
exports[`Filter Test Suite shuold support filter with double quote 2`] = ` | ||
Token { | ||
"next": 21, | ||
"position": 0, | ||
"raw": "$filter=key eq 'val\\"'", | ||
"type": "QueryOptions", | ||
"value": Object { | ||
"options": Array [ | ||
Token { | ||
"next": 21, | ||
"position": 0, | ||
"raw": "$filter=key eq 'val\\"'", | ||
"type": "Filter", | ||
"value": Token { | ||
"next": 21, | ||
"position": 8, | ||
"raw": "key eq 'val\\"'", | ||
"type": "EqualsExpression", | ||
"value": Object { | ||
"left": Token { | ||
"next": 11, | ||
"position": 8, | ||
"raw": "key", | ||
"type": "FirstMemberExpression", | ||
"value": Token { | ||
"next": 11, | ||
"position": 8, | ||
"raw": "key", | ||
"type": "MemberExpression", | ||
"value": Token { | ||
"next": 11, | ||
"position": 8, | ||
"raw": "key", | ||
"type": "PropertyPathExpression", | ||
"value": Token { | ||
"next": 11, | ||
"position": 8, | ||
"raw": "key", | ||
"type": "ODataIdentifier", | ||
"value": Object { | ||
"name": "key", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
"right": Token { | ||
"next": 21, | ||
"position": 15, | ||
"raw": "'val\\"'", | ||
"type": "Literal", | ||
"value": "Edm.String", | ||
}, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
} | ||
`; | ||
|
||
exports[`Filter Test Suite shuold support filter without double quote 1`] = `"$filter=key eq 'val'"`; | ||
|
||
exports[`Filter Test Suite shuold support filter without double quote 2`] = ` | ||
Token { | ||
"next": 20, | ||
"position": 0, | ||
"raw": "$filter=key eq 'val'", | ||
"type": "QueryOptions", | ||
"value": Object { | ||
"options": Array [ | ||
Token { | ||
"next": 20, | ||
"position": 0, | ||
"raw": "$filter=key eq 'val'", | ||
"type": "Filter", | ||
"value": Token { | ||
"next": 20, | ||
"position": 8, | ||
"raw": "key eq 'val'", | ||
"type": "EqualsExpression", | ||
"value": Object { | ||
"left": Token { | ||
"next": 11, | ||
"position": 8, | ||
"raw": "key", | ||
"type": "FirstMemberExpression", | ||
"value": Token { | ||
"next": 11, | ||
"position": 8, | ||
"raw": "key", | ||
"type": "MemberExpression", | ||
"value": Token { | ||
"next": 11, | ||
"position": 8, | ||
"raw": "key", | ||
"type": "PropertyPathExpression", | ||
"value": Token { | ||
"next": 11, | ||
"position": 8, | ||
"raw": "key", | ||
"type": "ODataIdentifier", | ||
"value": Object { | ||
"name": "key", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
"right": Token { | ||
"next": 20, | ||
"position": 15, | ||
"raw": "'val'", | ||
"type": "Literal", | ||
"value": "Edm.String", | ||
}, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters