Better version handling

This commit is contained in:
Mikhail Goncharov
2022-02-17 10:09:43 +01:00
parent 12574271ac
commit 29ea2bc2da
2 changed files with 3 additions and 3 deletions

View File

@@ -32,7 +32,7 @@ describe('Consuming Services locally', () => {
}) })
}) })
}).where(`name like`, 'E%') }).where(`name like`, 'E%')
if (cds.version >= '5.9.0') { if (require('semver').gte(cds.version, '5.9.0')) {
expect(authors).to.containSubset([ expect(authors).to.containSubset([
{ {
name: 'Emily Brontë', name: 'Emily Brontë',

View File

@@ -35,7 +35,7 @@ describe('Hierarchical Data', ()=>{
)) ))
it ('supports nested reads', async()=>{ it ('supports nested reads', async()=>{
if (cds.version >= '5.9.0') { if (require('semver').gte(cds.version, '5.9.0')) {
expect (await expect (await
SELECT.one.from (Cats, c=>{ SELECT.one.from (Cats, c=>{
c.ID, c.name.as('parent'), c.children (c=>{ c.ID, c.name.as('parent'), c.children (c=>{
@@ -65,7 +65,7 @@ describe('Hierarchical Data', ()=>{
}) })
it ('supports deeply nested reads', async()=>{ it ('supports deeply nested reads', async()=>{
if (cds.version >= '5.9.0') { if (require('semver').gte(cds.version, '5.9.0')) {
expect (await SELECT.one.from (Cats, c=>{ expect (await SELECT.one.from (Cats, c=>{
c.ID, c.name, c.children ( c.ID, c.name, c.children (
c => { c.name }, c => { c.name },