Add example for starting cds with ts-node

This commit is contained in:
Christian Georgi
2021-06-04 14:30:12 +02:00
parent 5e3258913e
commit e8d08d039e
4 changed files with 27 additions and 4 deletions

View File

@@ -0,0 +1,13 @@
const testKit = require('../test')
process.env.TYPESCRIPT_SUPPORT = 'true';
const {GET} = testKit.run('serve', 'hello/world.cds')
describe('Hello world!', () => {
it('should say hello with class impl from a typescript file', async () => {
const {data} = await GET`/say/hello(to='world')`
expect(data.value).toEqual('Hello world from a typescript file!')
})
})