diff --git a/test/cds.ql.test.js b/test/cds.ql.test.js index 79c28fe3..a8bfa7be 100644 --- a/test/cds.ql.test.js +++ b/test/cds.ql.test.js @@ -325,7 +325,26 @@ describe('cds.ql → cqn', () => { }) // using CQL fragments -> uses cds.parse.expr - expect((cqn = CQL`SELECT from Foo where ID=11 and x in ( foo, 'bar', 3)`)).to.eql({ + const is_v2 = !!cds.parse.expr('(1,2)').list + if (is_v2) expect((cqn = CQL`SELECT from Foo where ID=11 and x in ( foo, 'bar', 3)`)).to.eql({ + SELECT: { + from: { ref: ['Foo'] }, + where: [ + { ref: ['ID'] }, + '=', + { val: ID }, + 'and', + { ref: ['x'] }, + 'in', + {list:[ + { ref: ['foo'] }, + { val: 'bar' }, + { val: 3 }, + ]} + ], + }, + }) + else expect((cqn = CQL`SELECT from Foo where ID=11 and x in ( foo, 'bar', 3)`)).to.eql({ SELECT: { from: { ref: ['Foo'] }, where: [ diff --git a/test/messaging.test.js b/test/messaging.test.js index 7e9eeb2c..42d20d38 100644 --- a/test/messaging.test.js +++ b/test/messaging.test.js @@ -42,16 +42,16 @@ describe('Messaging', ()=>{ // { ID: 111 + (++N), subject: "201", title: "Captivating", rating: N }, // ), srv.create ('Reviews') .entries ( - { ID: 111 + (++N), subject: "201", title: "Captivating", rating: N } + { ID: String(111 + (++N)), subject: "201", title: "Captivating", rating: N } ), srv.create ('Reviews') .entries ( - { ID: 111 + (++N), subject: "201", title: "Captivating", rating: N } + { ID: String(111 + (++N)), subject: "201", title: "Captivating", rating: N } ), srv.create ('Reviews') .entries ( - { ID: 111 + (++N), subject: "201", title: "Captivating", rating: N } + { ID: String(111 + (++N)), subject: "201", title: "Captivating", rating: N } ), srv.create ('Reviews') .entries ( - { ID: 111 + (++N), subject: "201", title: "Captivating", rating: N } + { ID: String(111 + (++N)), subject: "201", title: "Captivating", rating: N } ), ]))