aboutsummaryrefslogtreecommitdiff
path: root/test/client.ts
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-12-02 15:26:25 +0300
committereug-vs <eug-vs@keemail.me>2020-12-02 15:26:25 +0300
commitf8ebf581f8272615f48ce355c6b2cbf8248c73bd (patch)
tree9473834f4045a9375dc0db48f042f4a6df0e016c /test/client.ts
parent994e0df96267b3de4d82926555ac4c4c7eefe14a (diff)
downloadmongo-cronjob-f8ebf581f8272615f48ce355c6b2cbf8248c73bd.tar.gz
feat: export client class
Diffstat (limited to 'test/client.ts')
-rw-r--r--test/client.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/client.ts b/test/client.ts
new file mode 100644
index 0000000..182859b
--- /dev/null
+++ b/test/client.ts
@@ -0,0 +1,19 @@
+import { Schema } from 'mongoose';
+import { Client } from '../lib';
+import { Event as EventBase } from '../lib/event.model';
+import connection from './utils/dbConnection';
+
+interface Context {
+ message: string;
+}
+
+export type Event = EventBase<Context>;
+
+const contextSchema = new Schema({
+ message: String
+});
+
+const client = new Client<Context>(connection, contextSchema);
+
+export default client;
+