1 /* eslint-disable security/detect-object-injection */
4 const sinon
= require('sinon'); // eslint-disable-line node/no-unpublished-require
12 'authenticationSuccess',
14 'authenticationUpsert',
17 const stubDatabase
= {
18 _implementation: [ ...spyFns
, ...stubFns
],
20 spyFns
.forEach((fn
) => sinon
.spy(stubDatabase
, fn
));
21 stubFns
.forEach((fn
) => sinon
.stub(stubDatabase
, fn
));
23 context: async (fn
) => await
fn({}),
24 transaction: async (dbCtx
, fn
) => await
fn(dbCtx
),
27 stubFns
.forEach((fn
) => {
28 stubDatabase
[fn
] = () => {};
31 module
.exports
= stubDatabase
;