breaking: bring your own sinon instead of bundling, to resolve leaks when versions...
[squeep-test-helper] / test / lib / stub-database.js
index cfb2801630f1765d024228efb1860541a6d21735..54ea92fd676a6e3885f39a420a05f0ae17ec1e81 100644 (file)
@@ -1,8 +1,8 @@
-/* eslint-env mocha */
 /* eslint-disable security/detect-object-injection */
 'use strict';
 
-const assert = require('assert');
+const assert = require('node:assert');
+const sinon = require('sinon');
 const StubDatabase = require('../../lib/stub-database');
 
 describe('StubDatabase', function () {
@@ -16,7 +16,7 @@ describe('StubDatabase', function () {
 
   describe('Base', function () {
     beforeEach(function () {
-      db = new StubDatabase();
+      db = new StubDatabase(sinon);
       db._reset();
     });
     it('covers implementation', invokeAllImplementation);
@@ -24,6 +24,9 @@ describe('StubDatabase', function () {
 
   describe('Extended', function () {
     class DB extends StubDatabase {
+      constructor() {
+        super(sinon);
+      }
       get _stubFns() {
         return [
           ...super._stubFns,