Skip to content

Commit

Permalink
fix: change unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
cmoinier committed May 24, 2024
1 parent c0d2115 commit 9a5b125
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -397,13 +397,13 @@ describe('Gn4PlatformService', () => {
)

service.getUserFeedbacks(mockUuid).subscribe({
next: () => {
done('Expected error, but got success')
},
error: (error) => {
expect(error).toBe(errorResponse)
next: (result) => {
expect(result).toBeUndefined()
done()
},
error: () => {
done('Expected success, but got error')
},
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class Gn4PlatformService implements PlatformServiceInterface {
),
catchError((error) => {
console.error('Error fetching user feedbacks:', error)
return of([]) // return an empty array as fallback
return of(undefined)
})
)
}
Expand All @@ -179,7 +179,7 @@ export class Gn4PlatformService implements PlatformServiceInterface {
map(() => undefined),
catchError((error) => {
console.error('Error posting user feedback:', error)
return of(undefined) // return undefined as fallback
return of(undefined)
})
)
}
Expand Down

0 comments on commit 9a5b125

Please sign in to comment.