test: enhance security module with comprehensive token validation and rate limiting tests
- Expanded TokenManager test suite with advanced token encryption and decryption scenarios - Added detailed rate limiting tests with IP-based tracking and window-based expiration - Improved test coverage for token validation, tampering detection, and error handling - Implemented mock configurations for faster test execution - Enhanced security test scenarios with unique IP addresses and edge case handling
This commit is contained in:
14
bunfig.toml
14
bunfig.toml
@@ -1,8 +1,22 @@
|
||||
[test]
|
||||
preload = ["./src/__tests__/setup.ts"]
|
||||
coverage = true
|
||||
coverageThreshold = {
|
||||
statements = 80,
|
||||
branches = 70,
|
||||
functions = 80,
|
||||
lines = 80
|
||||
}
|
||||
timeout = 30000
|
||||
testMatch = ["**/__tests__/**/*.test.ts"]
|
||||
testPathIgnorePatterns = ["/node_modules/", "/dist/"]
|
||||
collectCoverageFrom = [
|
||||
"src/**/*.{ts,tsx}",
|
||||
"!src/**/*.d.ts",
|
||||
"!src/**/*.test.ts",
|
||||
"!src/types/**/*",
|
||||
"!src/mocks/**/*"
|
||||
]
|
||||
|
||||
[build]
|
||||
target = "node"
|
||||
|
||||
Reference in New Issue
Block a user