aboutsummaryrefslogtreecommitdiff
path: root/test/scheduler.test.ts
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-12-04 01:12:54 +0300
committereug-vs <eug-vs@keemail.me>2020-12-04 01:14:12 +0300
commit569cb0457b4cdcffdf325bdfe8959d55e48efc25 (patch)
treeedc092e392ef9ec619964a917017a9d40ad6f659 /test/scheduler.test.ts
parentd513b23be26bda40d40ec43258345af6e34cfdfd (diff)
downloadmongo-cronjob-569cb0457b4cdcffdf325bdfe8959d55e48efc25.tar.gz
feat!: remove context schema from client
This will allow for multiple event types in one Model.
Diffstat (limited to 'test/scheduler.test.ts')
-rw-r--r--test/scheduler.test.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/scheduler.test.ts b/test/scheduler.test.ts
index 1736ed4..c341cc8 100644
--- a/test/scheduler.test.ts
+++ b/test/scheduler.test.ts
@@ -1,6 +1,14 @@
import { expect } from 'chai';
import Scheduler from '../lib/scheduler';
-import client, { Event } from './client';
+import { Event as EventBase } from '../lib/event.model';
+import client from './client';
+
+interface Context {
+ message: string;
+}
+
+type Event = EventBase<Context>;
+
const Model = client.Event;
const sleep = async (time: number) => new Promise<void>(res => setTimeout(res, time));