Fix jwt-token

This commit is contained in:
2025-09-16 06:46:40 +02:00
parent 34b898558e
commit 50f60035b5

View File

@@ -20,7 +20,7 @@ afterEach(() => {
// Test database configuration
const testDatabase = {
dialect: 'sqlite',
storage: './test.db', // Use same file database as models/index.js
storage: ':memory:', // Use in-memory database for fast tests
logging: false, // Disable SQL logging in tests
sync: { force: true } // Always recreate tables for tests
};
@@ -32,6 +32,9 @@ let models;
* Setup test environment before all tests
*/
async function setupTestEnvironment() {
// Clear any existing global models
delete global.__TEST_MODELS__;
// Create test database connection
sequelize = new Sequelize(testDatabase);