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