From ca41a2141cf25c00205c34bd6150eba81d961514 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 31 Aug 2021 19:28:55 +0200 Subject: [PATCH] one more --- test/cds.ql.test.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/cds.ql.test.js b/test/cds.ql.test.js index b3cdb59c..706e8a2a 100644 --- a/test/cds.ql.test.js +++ b/test/cds.ql.test.js @@ -248,6 +248,25 @@ describe('cds.ql → cqn', () => { }) }) + test ("where x='*'", ()=>{ + if (cdr) + expect (SELECT.from(Foo).where({x:'*'})) + .to.eql(SELECT.from(Foo).where("x='*'")) + .to.eql(SELECT.from(Foo).where("x=",'*')) + .to.eql(SELECT.from(Foo).where`x=${'*'}`) + .to.eql( + CQL`SELECT from Foo where x='*'` + ) + if (cdr) + expect (SELECT.from(Foo).where({x:['*',1]})) + .to.eql(SELECT.from(Foo).where("x in ('*',1)")) + .to.eql(SELECT.from(Foo).where("x in",['*',1])) + .to.eql(SELECT.from(Foo).where`x in ${['*',1]}`) + .to.eql( + CQL`SELECT from Foo where x in ('*',1)` + ) + }) + test ('where, and, or', ()=>{ expect ( SELECT.from(Foo).where({x:1,and:{y:2}})