Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ NODE_ENV=development
PORT=3200
MONGODB_URL=mongodb://localhost:27017/autowrx

# Open dev auth: enables public viewing + self-registration. Set to true (or omit) for closed mode.
STRICT_AUTH=false

JWT_COOKIE_NAME=token
JWT_SECRET=dev_secret_change_me
# Number of minutes after which an access token expires
Expand All @@ -12,7 +15,6 @@ JWT_REFRESH_EXPIRATION_DAYS=30
JWT_RESET_PASSWORD_EXPIRATION_MINUTES=10
# Number of minutes after which a verify email token expires
JWT_VERIFY_EMAIL_EXPIRATION_MINUTES=10
JWT_COOKIE_NAME=your-token-name
JWT_COOKIE_DOMAIN=your-domain


Expand Down
14 changes: 14 additions & 0 deletions backend/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright (c) 2025 Eclipse Foundation.
//
// This program and the accompanying materials are made available under the
// terms of the MIT License which is available at
// https://opensource.org/licenses/MIT.
//
// SPDX-License-Identifier: MIT

// Babel config used only by Jest. The backend runs Node directly (no build
// step); this exists so Jest can transpile ESM-only dependencies such as
// @paralleldrive/cuid2 when running the test suite.
module.exports = {
presets: [['@babel/preset-env', { targets: { node: 'current' } }]],
};
7 changes: 7 additions & 0 deletions backend/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ module.exports = {
NODE_ENV: 'test',
},
restoreMocks: true,
// Transpile ESM-only dependencies (e.g. @paralleldrive/cuid2) via Babel so
// Jest can require() them. babel-jest ignores node_modules by default; the
// negative-lookahead below opts the listed packages back into transformation.
transform: {
'^.+\\.js$': 'babel-jest',
},
transformIgnorePatterns: ['/node_modules/(?!(@paralleldrive/cuid2|@noble)/)'],
coveragePathIgnorePatterns: ['node_modules', 'src/config', 'src/app.js', 'tests'],
coverageReporters: ['text', 'lcov', 'clover', 'html'],
};
Loading