Skip to content

Commit

Permalink
format-changed-files
Browse files Browse the repository at this point in the history
  • Loading branch information
prayanshchh committed Nov 7, 2024
1 parent f45df1c commit 476e9a3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 21 deletions.
14 changes: 7 additions & 7 deletions setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ import { askToKeepValues } from "./src/setup/askToKeepValues";
import { getNodeEnvironment } from "./src/setup/getNodeEnvironment";
import { isValidEmail } from "./src/setup/isValidEmail";
import { validateRecaptcha } from "./src/setup/reCaptcha";
import {
askForRedisUrl,
checkExistingRedis,
checkRedisConnection
import {
askForRedisUrl,
checkExistingRedis,
checkRedisConnection,
} from "./src/setup/redisConfiguration";
import {
setImageUploadSize,
validateImageFileSize
import {
setImageUploadSize,
validateImageFileSize,
} from "./src/setup/setImageUploadSize";
import { askForSuperAdminEmail } from "./src/setup/superAdmin";
import { updateEnvVariable } from "./src/setup/updateEnvVariable";
Expand Down
24 changes: 10 additions & 14 deletions tests/utilities/hashingModule.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,16 @@ describe("hashingModule", () => {
try {
const pepper1 = await setHashPepper();
const pepper2 = await setHashPepper();
if(pepper1 != undefined && pepper2 != undefined)
{

process.env.HASH_PEPPER = pepper1;
const hash1 = hashEmail(email);
process.env.HASH_PEPPER = "pepper2";
const hash2 = hashEmail(email);
expect(hash1).not.toEqual(hash2);
}
if (pepper1 != undefined && pepper2 != undefined) {
process.env.HASH_PEPPER = pepper1;
const hash1 = hashEmail(email);
process.env.HASH_PEPPER = "pepper2";
const hash2 = hashEmail(email);
expect(hash1).not.toEqual(hash2);
}
finally {
process.env.HASH_PEPPER = originalPepper;
}
}
);
} finally {
process.env.HASH_PEPPER = originalPepper;
}
});
});
});

0 comments on commit 476e9a3

Please sign in to comment.