Files
cloud-cap-samples/hello/test/hello-world-test.js
Daniel 18f9f6c3f8 Removing ts-jest complexity
-> keeping our CI/CD pipelines fast and simple
2022-09-01 11:02:12 +02:00

14 lines
443 B
JavaScript

const cds = require ('@sap/cds')
describe('Hello world!', () => {
beforeAll (()=> process.env.CDS_TYPESCRIPT = true)
afterAll (()=> delete process.env.CDS_TYPESCRIPT)
const {GET} = cds.test.in(__dirname,'../srv').run('serve', 'world.cds')
it('should say hello with class impl', async () => {
const {data} = await GET`/say/hello(to='world')`
expect(data.value).toMatch(/Hello world.*typescript.*/i)
})
})