SAP-samples / cap-sflight

Using SAP Cloud Application Programming Model and SAP Fiori elements to build a simple travel management app, both with Node.js and Java.
https://cap.cloud.sap
Apache License 2.0
187 stars 131 forks source link

Adjust tests to start test server inside describe #1177

Open gregorwolf opened 2 months ago

gregorwolf commented 2 months ago

Hello cap-sflight Team,

The CAPire documentation on Testing with cds.test describes in the section Running a CAP Server that the cds.test should be started inside a describe:

const cds = require('@sap/cds')
describe(()=>{
  const test = cds.test(__dirname+'/..')
})

This is currently not done in https://github.com/SAP-samples/cap-sflight/blob/main/test/odata.test.js.

Best Regards Gregor