mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2026-08-13 12:33:07 +02:00
- Set up vitest for server-side testing with coverage reporting - Add 54 unit tests for CommonService in server/utils/common.ts - Tests cover: maskPasswords, convertTimeToEpoch, convertTimestampToTime, sort functions, camelCase, titleCase, removeAuthSecureData, removeSecureData, getRequestIP, findNode, getMonthDays, isVersionCompatible, handleError, and runWithConcurrencyLimit - Add npm scripts: test:server and test:server:coverage - Achieves 44% statement coverage and 46% branch coverage for common.ts Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev> Co-authored-by: shahana-farooqui <shahana.farooqui@gmail.com>
20 lines
420 B
TypeScript
20 lines
420 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
include: ['server/**/*.spec.ts'],
|
|
environment: 'node',
|
|
globals: true,
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'html'],
|
|
include: ['server/**/*.ts'],
|
|
exclude: ['server/**/*.spec.ts', 'server/models/**']
|
|
}
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
// Handle ES module imports
|
|
}
|
|
}
|
|
});
|