mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
test: Fix randomly failing UM tests (#3061)
* ⚡ Declutter test logs * 🐛 Fix random passwords length * 🐛 Fix password hashing in test user creation * 🐛 Hash leftover password * ⚡ Improve error message for `compare` * ⚡ Restore `randomInvalidPassword` contant * ⚡ Mock Telemetry module to prevent `--forceExit` * ⚡ Silence logger * ⚡ Simplify condition * ⚡ Unhash password in payload
This commit is contained in:
@@ -96,15 +96,13 @@ export function sendSuccessResponse(
|
||||
}
|
||||
}
|
||||
|
||||
export function sendErrorResponse(res: Response, error: ResponseError, shouldLog = true) {
|
||||
export function sendErrorResponse(res: Response, error: ResponseError) {
|
||||
let httpStatusCode = 500;
|
||||
if (error.httpStatusCode) {
|
||||
httpStatusCode = error.httpStatusCode;
|
||||
}
|
||||
|
||||
shouldLog = !process.argv[1].split('/').includes('jest');
|
||||
|
||||
if (process.env.NODE_ENV !== 'production' && shouldLog) {
|
||||
if (!process.env.NODE_ENV || process.env.NODE_ENV === 'development') {
|
||||
console.error('ERROR RESPONSE');
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user