qgenutils
Version:
A security-first Node.js utility library providing authentication, HTTP operations, URL processing, validation, datetime formatting, and template rendering. Designed as a lightweight alternative to heavy npm packages with comprehensive error handling and
56 lines (44 loc) • 1.14 kB
JavaScript
// Jest configuration for QGenUtils test suite. This file defines how tests are
// discovered, the coverage requirements, and other runtime behaviors for Jest.
module.exports = {
// Test environment
testEnvironment: 'node',
// Test file patterns
testMatch: [
'**/tests/**/*.test.js',
'**/tests/**/*.spec.js'
],
// Setup files
setupFilesAfterEnv: ['<rootDir>/tests/setup.js'],
// Coverage configuration
collectCoverage: true,
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html'],
// Coverage thresholds
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80
}
},
// Files to collect coverage from
collectCoverageFrom: [
'lib/**/*.js',
'index.js',
'!**/node_modules/**',
'!**/tests/**',
'!**/coverage/**'
],
// Module paths
modulePathIgnorePatterns: ['<rootDir>/coverage/'],
// Test timeout
testTimeout: 10000,
// Verbose output
verbose: true,
// Clear mocks between tests
clearMocks: true,
// Restore mocks after each test
restoreMocks: true
};