@checkstack/test-utils-backend 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/package.json +1 -1
- package/src/mock-queue-factory.ts +4 -2
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -65,7 +65,9 @@ export function createMockQueueManager(): QueueManager {
|
|
|
65
65
|
scheduleRecurring: async (data, options) => {
|
|
66
66
|
recurringJobs.set(options.jobId, {
|
|
67
67
|
data,
|
|
68
|
-
intervalSeconds
|
|
68
|
+
// Store intervalSeconds if present (XOR pattern - one must be defined)
|
|
69
|
+
intervalSeconds:
|
|
70
|
+
"intervalSeconds" in options ? options.intervalSeconds! : 0,
|
|
69
71
|
});
|
|
70
72
|
return options.jobId;
|
|
71
73
|
},
|
|
@@ -76,7 +78,7 @@ export function createMockQueueManager(): QueueManager {
|
|
|
76
78
|
return [...recurringJobs.keys()];
|
|
77
79
|
},
|
|
78
80
|
getRecurringJobDetails: async (
|
|
79
|
-
jobId
|
|
81
|
+
jobId,
|
|
80
82
|
): Promise<RecurringJobDetails<T> | undefined> => {
|
|
81
83
|
const job = recurringJobs.get(jobId);
|
|
82
84
|
if (!job) return undefined;
|