feat: add modular services and repositories for improved code organization
Introduce repository pattern across multiple services, including `favorites`, `tags`, `sessions`, `reports`, `auth`, and more. Decouple crypto functionalities into modular services like `HashingService`, `JwtService`, and `EncryptionService`. Improve testability and maintainability by simplifying dependencies and consolidating utility logic.
This commit is contained in:
@@ -64,6 +64,10 @@ jest.mock("jose", () => ({
|
||||
}));
|
||||
|
||||
import { CryptoService } from "./crypto.service";
|
||||
import { HashingService } from "./services/hashing.service";
|
||||
import { JwtService } from "./services/jwt.service";
|
||||
import { EncryptionService } from "./services/encryption.service";
|
||||
import { PostQuantumService } from "./services/post-quantum.service";
|
||||
|
||||
describe("CryptoService", () => {
|
||||
let service: CryptoService;
|
||||
@@ -72,6 +76,10 @@ describe("CryptoService", () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [
|
||||
CryptoService,
|
||||
HashingService,
|
||||
JwtService,
|
||||
EncryptionService,
|
||||
PostQuantumService,
|
||||
{
|
||||
provide: ConfigService,
|
||||
useValue: {
|
||||
|
||||
Reference in New Issue
Block a user