Fix jwt-token

This commit is contained in:
2025-09-15 14:02:43 +02:00
parent 44f2607773
commit d42b0ee028

View File

@@ -118,9 +118,6 @@ async function cleanDatabase() {
// Re-enable foreign key checks // Re-enable foreign key checks
await sequelize.query('PRAGMA foreign_keys = ON'); await sequelize.query('PRAGMA foreign_keys = ON');
// Reset test counter to ensure fresh unique IDs
testCounter = 0;
console.log('✅ Database cleaned successfully'); console.log('✅ Database cleaned successfully');
} catch (error) { } catch (error) {
console.error('❌ Database cleanup failed:', error.message); console.error('❌ Database cleanup failed:', error.message);
@@ -137,7 +134,7 @@ let testCounter = 0;
*/ */
function getUniqueTestSuffix() { function getUniqueTestSuffix() {
testCounter++; testCounter++;
return Date.now() + '-' + testCounter + '-' + Math.random().toString(36).substr(2, 5); return Date.now() + '-' + testCounter + '-' + Math.random().toString(36).substr(2, 9) + '-' + process.hrtime.bigint().toString(36);
} }
/** /**