mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-20 02:30:18 -05:00
fix: align auth test timeout formatting
This commit is contained in:
@@ -118,23 +118,19 @@ describe("Auth Utils", () => {
|
||||
expect(isValid).toBe(false);
|
||||
});
|
||||
|
||||
test(
|
||||
"should generate different hashes for same password",
|
||||
async () => {
|
||||
// Hash twice in parallel so the test doesn't incur two full bcrypt rounds sequentially.
|
||||
// Running them concurrently keeps the assertion meaningful while avoiding unnecessary timeouts.
|
||||
const [hash1, hash2] = await Promise.all([
|
||||
hashPassword(password),
|
||||
hashPassword(password),
|
||||
]);
|
||||
// Bcrypt with a cost factor of 12 can outlive Vitest's 5s default when CI hosts are busy.
|
||||
test("should generate different hashes for same password", async () => {
|
||||
// Hash twice in parallel so the test doesn't incur two full bcrypt rounds sequentially.
|
||||
// Running them concurrently keeps the assertion meaningful while avoiding unnecessary timeouts.
|
||||
const [hash1, hash2] = await Promise.all([
|
||||
hashPassword(password),
|
||||
hashPassword(password),
|
||||
]);
|
||||
|
||||
expect(hash1).not.toBe(hash2);
|
||||
expect(await verifyPassword(password, hash1)).toBe(true);
|
||||
expect(await verifyPassword(password, hash2)).toBe(true);
|
||||
},
|
||||
// Bcrypt with a cost factor of 12 can outlive Vitest's 5s default when CI hosts are busy.
|
||||
15000
|
||||
);
|
||||
expect(hash1).not.toBe(hash2);
|
||||
expect(await verifyPassword(password, hash1)).toBe(true);
|
||||
expect(await verifyPassword(password, hash2)).toBe(true);
|
||||
}, 15000);
|
||||
|
||||
test("should hash complex passwords correctly", async () => {
|
||||
const complexPassword = "MyC0mpl3x!P@ssw0rd#2024$%^&*()";
|
||||
|
||||
@@ -46,8 +46,7 @@ export function LanguageSelect({ language, onLanguageChange, disabled, locale }:
|
||||
// Most ISO entries don't ship with every locale translation, so fall back to
|
||||
// English to keep the dropdown readable for locales such as Dutch that were
|
||||
// added recently.
|
||||
const getLabelForLocale = (item: TIso639Language) =>
|
||||
item.label[locale] ?? item.label["en-US"];
|
||||
const getLabelForLocale = (item: TIso639Language) => item.label[locale] ?? item.label["en-US"];
|
||||
|
||||
const filteredItems = items.filter((item) =>
|
||||
getLabelForLocale(item).toLowerCase().includes(searchTerm.toLowerCase())
|
||||
|
||||
Reference in New Issue
Block a user