From aaac6cc67823cbabde3bc575587931a38bef9928 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 23 Jul 2020 01:24:39 +0200 Subject: [PATCH] Secured cwd in test --- test/consuming-services.test.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/consuming-services.test.js b/test/consuming-services.test.js index 6a5b4174..1158452d 100644 --- a/test/consuming-services.test.js +++ b/test/consuming-services.test.js @@ -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 () => {