Merge pull request #326 from MikhailGoncharov/followup-324

Follow-up #324: better version handling
This commit is contained in:
Christian Georgi
2022-02-21 09:45:44 +01:00
committed by GitHub
4 changed files with 1163 additions and 1082 deletions

2238
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -20,6 +20,7 @@
"chai": "^4.3.4",
"chai-as-promised": "^7.1.1",
"chai-subset": "^1.6.0",
"semver": "^7",
"sqlite3": "npm:@mendix/sqlite3@^5"
},
"scripts": {

View File

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

View File

@@ -35,7 +35,7 @@ describe('Hierarchical Data', ()=>{
))
it ('supports 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=>{
c.ID, c.name.as('parent'), c.children (c=>{
@@ -65,7 +65,7 @@ describe('Hierarchical Data', ()=>{
})
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=>{
c.ID, c.name, c.children (
c => { c.name },