Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'test/server/db/MongoServerDaoTest.ts')
-rw-r--r--test/server/db/MongoServerDaoTest.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/server/db/MongoServerDaoTest.ts b/test/server/db/MongoServerDaoTest.ts
index b0a83bb..58e6ab9 100644
--- a/test/server/db/MongoServerDaoTest.ts
+++ b/test/server/db/MongoServerDaoTest.ts
@@ -22,7 +22,7 @@
'use strict';
import { MongoServerDao as Sut } from "../../../src/server/db/MongoServerDao";
-import { MongoSelector, MongoUpdate } from "mongodb";
+import { MongoSelector, MongoUpdate, MongoDb } from "mongodb";
import { expect, use as chai_use } from 'chai';
import { ServerSideQuote } from "../../../src/server/quote/ServerSideQuote";
import { PositiveInteger } from "../../../src/numeric";
@@ -139,7 +139,7 @@ describe( 'MongoServerDao', () =>
} );
-function createMockDb( on_update: any )
+function createMockDb( on_update: any ): MongoDb
{
const collection_quotes = {
update: on_update,
@@ -166,8 +166,9 @@ function createMockDb( on_update: any )
},
};
- const driver = {
+ const driver = <MongoDb>{
open: ( c: any ) => c( null, db ),
+ close: () => {},
on: () => {},
};