Fix jwt-token

This commit is contained in:
2025-09-16 06:32:03 +02:00
parent 644ae8c0a8
commit 819e0b8414
2 changed files with 3 additions and 3 deletions

View File

@@ -8,10 +8,10 @@ if (process.env.NODE_ENV !== 'test') {
// Configure database based on environment
let sequelize;
if (process.env.NODE_ENV === 'test') {
// Use SQLite in-memory database for testing
// Use SQLite file database for testing to allow sharing between modules
sequelize = new Sequelize({
dialect: 'sqlite',
storage: ':memory:',
storage: './test.db',
logging: false
});
} else {

View File

@@ -20,7 +20,7 @@ afterEach(() => {
// Test database configuration
const testDatabase = {
dialect: 'sqlite',
storage: ':memory:', // In-memory database for fast tests
storage: './test.db', // Use same file database as models/index.js
logging: false, // Disable SQL logging in tests
sync: { force: true } // Always recreate tables for tests
};