33import * as E from "fp-ts/lib/Either" ;
44
55import { NonEmptyString } from "@pagopa/ts-commons/lib/strings" ;
6+ import { FiscalCode } from "@pagopa/ts-commons/lib/strings" ;
67
7- import { FiscalCode } from "../../../generated/backend/FiscalCode" ;
88import { MessageBodyMarkdown } from "../../../generated/backend/MessageBodyMarkdown" ;
99import { MessageSubject } from "../../../generated/backend/MessageSubject" ;
1010import { PlatformEnum } from "../../../generated/backend/Platform" ;
@@ -87,7 +87,7 @@ describe("NotificationService#createOrUpdateInstallation", () => {
8787 } ) ;
8888
8989 it ( "should submit a correct installation to the Queue Storage, Apple platform" , async ( ) => {
90- mockSendMessage . mockImplementation ( _ => Promise . resolve ( ) ) ;
90+ mockSendMessage . mockImplementation ( ( _ ) => Promise . resolve ( ) ) ;
9191
9292 const service = new NotificationService ( "" , "" ) ;
9393
@@ -107,7 +107,7 @@ describe("NotificationService#createOrUpdateInstallation", () => {
107107 } ) ;
108108
109109 it ( "should submit a correct installation to the Queue Storage, Google platform" , async ( ) => {
110- mockSendMessage . mockImplementation ( _ => Promise . resolve ( ) ) ;
110+ mockSendMessage . mockImplementation ( ( _ ) => Promise . resolve ( ) ) ;
111111
112112 const service = new NotificationService ( "" , "" ) ;
113113
@@ -127,7 +127,7 @@ describe("NotificationService#createOrUpdateInstallation", () => {
127127 } ) ;
128128
129129 it ( "should fail if the Queue Storage fails on createOrUpdateInstallation" , async ( ) => {
130- mockSendMessage . mockImplementation ( _ => Promise . reject ( genericError ) ) ;
130+ mockSendMessage . mockImplementation ( ( _ ) => Promise . reject ( genericError ) ) ;
131131
132132 const service = new NotificationService ( "" , "" ) ;
133133
@@ -153,7 +153,7 @@ describe("NotificationService#notify", () => {
153153 } ) ;
154154
155155 it ( "should submit a notification to the Queue Storage" , async ( ) => {
156- mockSendMessage . mockImplementation ( _ => Promise . resolve ( ) ) ;
156+ mockSendMessage . mockImplementation ( ( _ ) => Promise . resolve ( ) ) ;
157157 const service = new NotificationService ( "" , "" ) ;
158158
159159 const res = await service . notify ( aValidNotification , aNotificationSubject ) ;
@@ -171,7 +171,7 @@ describe("NotificationService#notify", () => {
171171 } ) ;
172172
173173 it ( "should write organization name in title, if notificationTitle parameter is empty" , async ( ) => {
174- mockSendMessage . mockImplementation ( _ => Promise . resolve ( ) ) ;
174+ mockSendMessage . mockImplementation ( ( _ ) => Promise . resolve ( ) ) ;
175175 const service = new NotificationService ( "" , "" ) ;
176176
177177 const res = await service . notify ( aValidNotification , aNotificationSubject ) ;
@@ -189,7 +189,7 @@ describe("NotificationService#notify", () => {
189189 pipe (
190190 decodedMessage ,
191191 NotifyMessage . decode ,
192- E . map ( m =>
192+ E . map ( ( m ) =>
193193 expect ( m ) . toEqual ( {
194194 installationId : toFiscalCodeHash (
195195 aValidNotification . message . fiscal_code
@@ -202,12 +202,12 @@ describe("NotificationService#notify", () => {
202202 }
203203 } )
204204 ) ,
205- E . mapLeft ( _ => fail ( "Cannot decode NotifyMessage" ) )
205+ E . mapLeft ( ( _ ) => fail ( "Cannot decode NotifyMessage" ) )
206206 ) ;
207207 } ) ;
208208
209209 it ( "should write notificationTitle in title, if notificationTitle not empty" , async ( ) => {
210- mockSendMessage . mockImplementation ( _ => Promise . resolve ( ) ) ;
210+ mockSendMessage . mockImplementation ( ( _ ) => Promise . resolve ( ) ) ;
211211 const service = new NotificationService ( "" , "" ) ;
212212
213213 const res = await service . notify (
@@ -229,7 +229,7 @@ describe("NotificationService#notify", () => {
229229 pipe (
230230 decodedMessage ,
231231 NotifyMessage . decode ,
232- E . map ( m =>
232+ E . map ( ( m ) =>
233233 expect ( m ) . toEqual ( {
234234 installationId : toFiscalCodeHash (
235235 aValidNotification . message . fiscal_code
@@ -242,12 +242,12 @@ describe("NotificationService#notify", () => {
242242 }
243243 } )
244244 ) ,
245- E . mapLeft ( _ => fail ( "Cannot decode NotifyMessage" ) )
245+ E . mapLeft ( ( _ ) => fail ( "Cannot decode NotifyMessage" ) )
246246 ) ;
247247 } ) ;
248248
249249 it ( "should fail if the Queue Storage fails on notify" , async ( ) => {
250- mockSendMessage . mockImplementation ( _ => Promise . reject ( genericError ) ) ;
250+ mockSendMessage . mockImplementation ( ( _ ) => Promise . reject ( genericError ) ) ;
251251
252252 const service = new NotificationService ( "" , "" ) ;
253253
@@ -277,7 +277,7 @@ describe("NotificationService#deleteInstallation", () => {
277277 } ;
278278
279279 it ( "should submit a delete installation message to the Queue Storage" , async ( ) => {
280- mockSendMessage . mockImplementation ( _ => Promise . resolve ( ) ) ;
280+ mockSendMessage . mockImplementation ( ( _ ) => Promise . resolve ( ) ) ;
281281 const service = new NotificationService ( "" , "" ) ;
282282
283283 const res = await service . deleteInstallation ( aFiscalCode ) ;
@@ -294,7 +294,7 @@ describe("NotificationService#deleteInstallation", () => {
294294 } ) ;
295295
296296 it ( "should fail if the Queue Storage fails on deleteInstallation" , async ( ) => {
297- mockSendMessage . mockImplementation ( _ => Promise . reject ( genericError ) ) ;
297+ mockSendMessage . mockImplementation ( ( _ ) => Promise . reject ( genericError ) ) ;
298298 const service = new NotificationService ( "" , "" ) ;
299299
300300 const res = await service . deleteInstallation ( aFiscalCode ) ;
0 commit comments