cfb2801630f1765d024228efb1860541a6d21735
2 /* eslint-disable security/detect-object-injection */
5 const assert
= require('assert');
6 const StubDatabase
= require('../../lib/stub-database');
8 describe('StubDatabase', function () {
10 async
function invokeAllImplementation() {
11 Promise
.all(db
._implementation
.map(async (fn
) => {
13 assert(db
[fn
].called
, fn
);
17 describe('Base', function () {
18 beforeEach(function () {
19 db
= new StubDatabase();
22 it('covers implementation', invokeAllImplementation
);
25 describe('Extended', function () {
26 class DB
extends StubDatabase
{
38 beforeEach(function () {
42 it('covers implementation', invokeAllImplementation
);
43 it('covers missing methods', async
function () {