Kayvan Sylvan a1f8d52474
chore: rename log level environment variable to TASKMASTER_LOG_LEVEL (#417)
* chore: rename log level environment variable to `TASKMASTER_LOG_LEVEL`

### CHANGES
- Update environment variable from `LOG_LEVEL` to `TASKMASTER_LOG_LEVEL`.
- Reflect change in documentation for clarity.
- Adjust variable name in script and test files.
- Maintain default log level as `info`.

* fix: add changeset

* chore: rename `LOG_LEVEL` to `TASKMASTER_LOG_LEVEL` for consistency

### CHANGES
- Update environment variable name to `TASKMASTER_LOG_LEVEL` in documentation.
- Reflect rename in configuration rules for clarity.
- Maintain consistency across project configuration settings.
2025-05-15 01:09:41 +02:00

34 lines
1022 B
JavaScript

/**
* Jest setup file
*
* This file is run before each test suite to set up the test environment.
*/
// Mock environment variables
process.env.MODEL = 'sonar-pro';
process.env.MAX_TOKENS = '64000';
process.env.TEMPERATURE = '0.2';
process.env.DEBUG = 'false';
process.env.TASKMASTER_LOG_LEVEL = 'error'; // Set to error to reduce noise in tests
process.env.DEFAULT_SUBTASKS = '5';
process.env.DEFAULT_PRIORITY = 'medium';
process.env.PROJECT_NAME = 'Test Project';
process.env.PROJECT_VERSION = '1.0.0';
// Ensure tests don't make real API calls by setting mock API keys
process.env.ANTHROPIC_API_KEY = 'test-mock-api-key-for-tests';
process.env.PERPLEXITY_API_KEY = 'test-mock-perplexity-key-for-tests';
// Add global test helpers if needed
global.wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
// If needed, silence console during tests
if (process.env.SILENCE_CONSOLE === 'true') {
global.console = {
...console,
log: () => {},
info: () => {},
warn: () => {},
error: () => {}
};
}