Use test API from cds lib instead of custom one

This commit is contained in:
Christian Georgi
2020-10-27 18:03:13 +01:00
committed by Daniel Hutzel
parent 392106d44a
commit 5d64ca3555
9 changed files with 14 additions and 172 deletions

View File

@@ -1,9 +1,5 @@
const { GET, POST, expect } = require('./cds').test('bookshop').in(__dirname,'..')
const is_jest = !!global.test
if (is_jest) { // it's jest
global.before = (msg,fn) => global.beforeAll(fn||msg)
global.after = (msg,fn) => global.afterAll(fn||msg)
}
const cds = require('@sap/cds/lib')
const { GET, POST, expect } = cds.test('bookshop').in(__dirname,'..')
describe('Custom Handlers', () => {