UNPKG

agentsqripts

Version:

Comprehensive static code analysis toolkit for identifying technical debt, security vulnerabilities, performance issues, and code quality problems

58 lines (51 loc) 1.72 kB
/** * @file Unit tests for analysisConfig module * @description Tests configuration module structure and exports */ // 🔗 Tests: analysisConfig → WET_CODE_CONFIG → UI_CONFIG → BUG_CONFIG // Use qtests setup for consistent testing environment const { testHelpers, createAssertions } = require('qtests'); const mod = require('./analysisConfig.js'); /** * qtests test suite for analysisConfig */ function getTestSuite() { const assert = createAssertions(); return { 'Configuration module loads correctly': async () => { await testHelpers.withSavedEnv(async () => { // Verify main configurations are exported assert.truthy(typeof mod.WET_CODE_CONFIG === 'object', 'WET_CODE_CONFIG should be exported'); assert.truthy(typeof mod.UI_CONFIG === 'object', 'UI_CONFIG should be exported'); assert.truthy(typeof mod.BUG_CONFIG === 'object', 'BUG_CONFIG should be exported'); }); } }; } module.exports = { getTestSuite }; // Auto-execute when run directly (for qtests-runner compatibility) if (require.main === module) { (async () => { const testSuite = getTestSuite(); let passed = 0; let failed = 0; for (const [testName, testFn] of Object.entries(testSuite)) { try { await testFn(); console.log(`✓ ${testName}`); passed++; } catch (error) { console.log(`✗ ${testName}`); console.error(`Error: ${error.message}`); failed++; } } if (failed > 0) { console.log(`\nSummary: ${passed} passed, ${failed} failed`); process.exit(1); } else { console.log(`\nSummary: ${passed} passed`); process.exit(0); } })(); }