@feathers-baas/plugin-notifications 0.2.0 → 0.3.0

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.
@@ -28,7 +28,12 @@ vi.mock('bullmq', () => ({
28
28
  }))
29
29
 
30
30
  // ─── Imports after mocking ────────────────────────────────────────────────────
31
- import { createNotificationQueue, enqueueNotification, NOTIFICATION_QUEUE_NAME } from '../src/queue/producer.js'
31
+ import {
32
+ createNotificationQueue,
33
+ enqueueNotification,
34
+ NOTIFICATION_QUEUE_NAME,
35
+ NOTIFICATION_QUEUE_PREFIX,
36
+ } from '../src/queue/producer.js'
32
37
  import { createNotificationWorker } from '../src/queue/worker.js'
33
38
  import { DriverRegistry } from '../src/registry.js'
34
39
  import type { NotifierDriver } from '../src/types.js'
@@ -52,6 +57,7 @@ describe('createNotificationQueue', () => {
52
57
  expect(vi.mocked(Queue)).toHaveBeenCalledWith(
53
58
  NOTIFICATION_QUEUE_NAME,
54
59
  expect.objectContaining({
60
+ prefix: NOTIFICATION_QUEUE_PREFIX,
55
61
  defaultJobOptions: expect.objectContaining({
56
62
  attempts: 5,
57
63
  backoff: expect.objectContaining({ type: 'exponential' }),
@@ -97,7 +103,7 @@ describe('createNotificationWorker', () => {
97
103
  expect(vi.mocked(Worker)).toHaveBeenCalledWith(
98
104
  NOTIFICATION_QUEUE_NAME,
99
105
  expect.any(Function),
100
- expect.objectContaining({ concurrency: 3 }),
106
+ expect.objectContaining({ concurrency: 3, prefix: NOTIFICATION_QUEUE_PREFIX }),
101
107
  )
102
108
  })
103
109