mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2026-08-13 12:33:07 +02:00
- Set up Vitest testing framework for backend TypeScript tests - Add vitest.config.ts with coverage configuration - Add comprehensive tests for server/utils/common.ts including: - maskPasswords: password field masking in objects - convertTimeToEpoch: date to epoch conversion - sortAscByKey/sortDescByKey: numeric sorting utilities - sortAscByStrKey/sortDescByStrKey: string sorting utilities - newestOnTop: array reordering - camelCase/titleCase: string case conversion - isVersionCompatible: semantic version comparison - getMonthDays: calendar month day calculation - findNode: node lookup by index - removeAuthSecureData/removeSecureData: secure data removal - getRequestIP: client IP extraction - handleError: error response formatting for LND/CLN/ECL - runWithConcurrencyLimit: concurrent task execution - Add npm scripts for backend testing: test:backend and test:backend:coverage - 59 tests passing with coverage reporting Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev> Co-authored-by: shahana-farooqui <shahana.farooqui@gmail.com>
15 lines
357 B
TypeScript
15 lines
357 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
globals: true,
|
|
environment: 'node',
|
|
include: ['server/**/*.test.ts'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html'],
|
|
include: ['server/**/*.ts'],
|
|
exclude: ['server/**/*.test.ts', 'server/models/**']
|
|
}
|
|
}
|
|
});
|