Prepare moving test kit over to @sap/cds

This commit is contained in:
Daniel
2020-08-19 09:38:07 +02:00
parent a43ade103c
commit 039f62209c
12 changed files with 171 additions and 182 deletions

View File

@@ -1,14 +1,11 @@
const cwd = process.cwd()
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)
}
before (()=> process.chdir(__dirname))
after (()=> process.chdir(cwd))
describe('Custom Handlers', () => {
const { GET, POST, expect } = require('./capire').launch('bookshop')
it('should reject out-of-stock orders', async () => {
await expect(