Skip to content

Commit 4ccd2e7

Browse files
committed
Change RSQL custom operator regex
1 parent 4cbc3b8 commit 4ccd2e7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rsql-mongodb",
3-
"version": "1.5.3",
3+
"version": "2.0.0",
44
"description": "Converting RSQL queries to MongoDB queries",
55
"main": "rsql-mongodb.js",
66
"typings": "rsql-mongodb.ts",

test.js

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ describe('rsql-mongodb', function () {
8282
});
8383
it("Test errors", function () {
8484
expect(function () { rsqlMongoDB('azerty') }).to.throw('Wrong RSQL query. No operator found.');
85+
expect(function () { rsqlMongoDB('lastName=~do*') }).to.throw('Wrong RSQL query. No operator found.');
8586
expect(function () { rsqlMongoDB("name=='SELECT (CHaR(75)||CHaR(76)||CHaR(77))'") }).to.throw('Wrong RSQL query. No operator found.');
8687
expect(function () { rsqlMongoDB('firstName=={ $where: [ { lastName : "doe" } ] }') }).to.throw('Injection detected.');
8788
expect(function () { rsqlMongoDB('birthday==1959-21-12') }).to.throw('Invalid Date.');

0 commit comments

Comments
 (0)