new messaging
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
const cwd = process.cwd(); process.chdir (__dirname) //> only for internal CI/CD@SAP
|
||||
const cds = require ('./cds'), {expect} = cds.test
|
||||
const _model = '@capire/reviews'
|
||||
let messaging
|
||||
|
||||
|
||||
describe('Messaging', ()=>{
|
||||
|
||||
beforeAll(async () => {
|
||||
messaging = await cds.connect.to('messaging')
|
||||
})
|
||||
after(()=> process.chdir(cwd))
|
||||
|
||||
it ('should bootstrap sqlite in-memory db', async()=>{
|
||||
@@ -20,11 +24,11 @@ describe('Messaging', ()=>{
|
||||
|
||||
let N=0, received=[], M=0
|
||||
it ('should add messaging event handlers', ()=>{
|
||||
srv.on('reviewed', (msg,next)=> { received.push(msg); return next() })
|
||||
messaging.on('review/reviewed', (msg,next)=> { received.push(msg); return next() })
|
||||
})
|
||||
|
||||
it ('should add more messaging event handlers', ()=>{
|
||||
srv.on('reviewed', (_,next)=> { ++M; return next() })
|
||||
messaging.on('review/reviewed', (_,next)=> { ++M; return next() })
|
||||
})
|
||||
|
||||
it ('should add review', async ()=>{
|
||||
|
||||
Reference in New Issue
Block a user