Secured cwd in test

This commit is contained in:
Daniel
2020-07-23 01:24:39 +02:00
parent 99fdf0c038
commit aaac6cc678

View File

@@ -1,9 +1,11 @@
const { expect } = require('./capire')
const cds = require('@sap/cds')
const cwd = process.cwd()
describe('Consuming Services locally', () => {
//
before('bootstrap db and services', async () => {
process.chdir(__dirname)
const model = await cds.load(['@capire/bookshop', '@capire/common'])
await cds.deploy(model).to('sqlite::memory:')
const { AdminService } = await cds.serve('AdminService').from(model)
@@ -12,6 +14,8 @@ describe('Consuming Services locally', () => {
expect(Authors).not.to.be.undefined
})
after(()=> process.chdir(cwd))
it('bootrapped the database successfully', ()=>{})
it('supports targets as strings or reflected defs', async () => {