@@ -5,6 +5,7 @@ import type {
55 BaseNotificationTypeConfig ,
66 NotificationFilter ,
77} from 'vintasend' ;
8+ import { beforeEach , describe , expect , it , type Mocked , vi } from 'vitest' ;
89import { MedplumNotificationBackend } from '../medplum-backend' ;
910
1011interface TestConfig extends BaseNotificationTypeConfig {
@@ -19,7 +20,7 @@ interface TestConfig extends BaseNotificationTypeConfig {
1920
2021describe ( 'MedplumNotificationBackend' , ( ) => {
2122 let medplumClient : MockClient ;
22- let mockAttachmentManager : vi . Mocked < BaseAttachmentManager > ;
23+ let mockAttachmentManager : Mocked < BaseAttachmentManager > ;
2324 let backend : MedplumNotificationBackend < TestConfig > ;
2425
2526 beforeEach ( ( ) => {
@@ -32,7 +33,7 @@ describe('MedplumNotificationBackend', () => {
3233 detectContentType : vi . fn ( ) ,
3334 calculateChecksum : vi . fn ( ) ,
3435 fileToBuffer : vi . fn ( ) ,
35- } as unknown as vi . Mocked < BaseAttachmentManager > ;
36+ } as unknown as Mocked < BaseAttachmentManager > ;
3637
3738 backend = new MedplumNotificationBackend ( medplumClient , {
3839 emailNotificationSubjectExtensionUrl :
@@ -565,7 +566,8 @@ describe('MedplumNotificationBackend', () => {
565566 it ( 'should correctly serialize regular notification' , ( ) => {
566567 const mockCommunication = createMockCommunication ( { id : '123' } ) ;
567568
568- const result = backend . mapToDatabaseNotification ( mockCommunication as any ) ;
569+ // biome-ignore lint/complexity/useLiteralKeys: Testing private method directly for coverage - can ignore complexity here
570+ const result = backend [ 'mapToDatabaseNotification' ] ( mockCommunication as any ) ;
569571
570572 expect ( result ) . toMatchObject ( {
571573 id : '123' ,
@@ -595,7 +597,8 @@ describe('MedplumNotificationBackend', () => {
595597 ] ,
596598 } ) ;
597599
598- const result = backend . mapToDatabaseNotification ( mockCommunication as any ) ;
600+ // biome-ignore lint/complexity/useLiteralKeys: Testing private method directly for coverage - can ignore complexity here
601+ const result = backend [ 'mapToDatabaseNotification' ] ( mockCommunication as any ) ;
599602
600603 expect ( result ) . toMatchObject ( {
601604 id : '123' ,
@@ -608,7 +611,8 @@ describe('MedplumNotificationBackend', () => {
608611
609612 it ( 'should handle notification with all required fields' , ( ) => {
610613 const mockCommunication = createMockCommunication ( { id : '123' } ) ;
611- const result = backend . mapToDatabaseNotification ( mockCommunication as any ) ;
614+ // biome-ignore lint/complexity/useLiteralKeys: Testing private method directly for coverage - can ignore complexity here
615+ const result = backend [ 'mapToDatabaseNotification' ] ( mockCommunication as any ) ;
612616
613617 expect ( result ) . toMatchObject ( {
614618 id : '123' ,
@@ -642,8 +646,10 @@ describe('MedplumNotificationBackend', () => {
642646 ] ,
643647 } ) ;
644648
645- const mappedWithSha = backend . mapToDatabaseNotification ( withGitCommitSha as any ) ;
646- const mappedWithoutSha = backend . mapToDatabaseNotification ( withoutGitCommitSha as any ) ;
649+ // biome-ignore lint/complexity/useLiteralKeys: Testing private method directly for coverage - can ignore complexity here
650+ const mappedWithSha = backend [ 'mapToDatabaseNotification' ] ( withGitCommitSha as any ) ;
651+ // biome-ignore lint/complexity/useLiteralKeys: Testing private method directly for coverage - can ignore complexity here
652+ const mappedWithoutSha = backend [ 'mapToDatabaseNotification' ] ( withoutGitCommitSha as any ) ;
647653
648654 expect ( mappedWithSha . gitCommitSha ) . toBe ( 'd' . repeat ( 40 ) ) ;
649655 expect ( mappedWithoutSha . gitCommitSha ) . toBeNull ( ) ;
0 commit comments