test(s3): update mock implementation types for stricter type safety
Refactor mock implementations in S3 service tests to replace `any` with `unknown` for improved type safety and consistency.
This commit is contained in:
@@ -197,7 +197,7 @@ describe("S3Service", () => {
|
||||
|
||||
it("should use DOMAIN_NAME and PORT for localhost", () => {
|
||||
(configService.get as jest.Mock).mockImplementation(
|
||||
(key: string, def: any) => {
|
||||
(key: string, def: unknown) => {
|
||||
if (key === "API_URL") return null;
|
||||
if (key === "DOMAIN_NAME") return "localhost";
|
||||
if (key === "PORT") return 3000;
|
||||
@@ -210,7 +210,7 @@ describe("S3Service", () => {
|
||||
|
||||
it("should use api.DOMAIN_NAME for production", () => {
|
||||
(configService.get as jest.Mock).mockImplementation(
|
||||
(key: string, def: any) => {
|
||||
(key: string, def: unknown) => {
|
||||
if (key === "API_URL") return null;
|
||||
if (key === "DOMAIN_NAME") return "memegoat.fr";
|
||||
return def;
|
||||
|
||||
Reference in New Issue
Block a user