refactor: organize backend by business responsibility
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { ConflictException, INestApplication } from '@nestjs/common';
|
||||
import { JwtService } from '@nestjs/jwt';
|
||||
import { Test } from '@nestjs/testing';
|
||||
import request from 'supertest';
|
||||
import type { Server } from 'node:http';
|
||||
import request from 'supertest';
|
||||
import { AppModule } from '../src/app.module';
|
||||
import { TbankAccessService } from '../src/integrations/tbank/tbank-access.service';
|
||||
import { configureApp } from '../src/main';
|
||||
import { TbankAccessService } from '../src/tbank/tbank-access.service';
|
||||
|
||||
describe('All accounts HTTP boundary', () => {
|
||||
let app: INestApplication<Server>;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { INestApplication } from '@nestjs/common';
|
||||
import { JwtService } from '@nestjs/jwt';
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import request from 'supertest';
|
||||
import { App } from 'supertest/types';
|
||||
import { AppModule } from './../src/app.module';
|
||||
import { StructuredLogger } from './../src/common/logging/structured-logger.service';
|
||||
import { configureApp } from './../src/main';
|
||||
import { PrismaService } from './../src/prisma/prisma.service';
|
||||
import { AuthService } from './../src/auth/auth.service';
|
||||
import { AppModule } from '../src/app.module';
|
||||
import { StructuredLogger } from '../src/common/logging/structured-logger.service';
|
||||
import { configureApp } from '../src/main';
|
||||
import { AuthService } from '../src/modules/auth/application/auth.service';
|
||||
import { PrismaService } from '../src/prisma/prisma.service';
|
||||
|
||||
type Authentication = { user: { email: string }; accessToken: string };
|
||||
type Problem = { code: string };
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { INestApplication } from '@nestjs/common';
|
||||
import { JwtService } from '@nestjs/jwt';
|
||||
import { Test } from '@nestjs/testing';
|
||||
import assert from 'node:assert/strict';
|
||||
import { execFileSync } from 'node:child_process';
|
||||
import { randomUUID } from 'node:crypto';
|
||||
import type { Server } from 'node:http';
|
||||
import request from 'supertest';
|
||||
import { AppModule } from '../src/app.module';
|
||||
import { configureApp } from '../src/main';
|
||||
import { PrismaService } from '../src/prisma/prisma.service';
|
||||
import {
|
||||
BankCardDto,
|
||||
BankOperationDto,
|
||||
BankOperationsPageDto,
|
||||
BankSummaryDto,
|
||||
ExpenseCategoryDto,
|
||||
} from '../src/bank-cards/bank-card.dto';
|
||||
} from '../src/modules/banking/bank-cards/presentation/bank-card.dto';
|
||||
import { PrismaService } from '../src/prisma/prisma.service';
|
||||
|
||||
jest.setTimeout(60000);
|
||||
describe('Manual bank cards configured HTTP and real SQLite', () => {
|
||||
|
||||
+10
-4
@@ -1,16 +1,18 @@
|
||||
import {
|
||||
INestApplication,
|
||||
ConflictException,
|
||||
INestApplication,
|
||||
NotFoundException,
|
||||
ServiceUnavailableException,
|
||||
} from '@nestjs/common';
|
||||
import { JwtService } from '@nestjs/jwt';
|
||||
import { Test } from '@nestjs/testing';
|
||||
import request from 'supertest';
|
||||
import type { Server } from 'node:http';
|
||||
import request from 'supertest';
|
||||
import { AppModule } from '../src/app.module';
|
||||
import { configureApp } from '../src/main';
|
||||
import { BondService } from '../src/tbank/bond.service';
|
||||
import { BondIncomeService } from '../src/modules/investments/instruments/bonds/application/bond-income.service';
|
||||
import { BondMarketService } from '../src/modules/investments/instruments/bonds/application/bond-market.service';
|
||||
import { BondCatalogService } from '../src/modules/investments/instruments/bonds/application/bond-catalog.service';
|
||||
|
||||
const uid = 'e6123145-9665-43e0-8413-cd61b8aa9b13';
|
||||
describe('Bond HTTP contract', () => {
|
||||
@@ -28,7 +30,11 @@ describe('Bond HTTP contract', () => {
|
||||
);
|
||||
beforeAll(async () => {
|
||||
const module = await Test.createTestingModule({ imports: [AppModule] })
|
||||
.overrideProvider(BondService)
|
||||
.overrideProvider(BondCatalogService)
|
||||
.useValue(bonds)
|
||||
.overrideProvider(BondMarketService)
|
||||
.useValue(bonds)
|
||||
.overrideProvider(BondIncomeService)
|
||||
.useValue(bonds)
|
||||
.compile();
|
||||
app = module.createNestApplication();
|
||||
|
||||
@@ -3,8 +3,8 @@ import { Test } from '@nestjs/testing';
|
||||
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
|
||||
import { readFile } from 'node:fs/promises';
|
||||
import { resolve } from 'node:path';
|
||||
import { AppModule } from './../src/app.module';
|
||||
import { configureApp } from './../src/main';
|
||||
import { AppModule } from '../src/app.module';
|
||||
import { configureApp } from '../src/main';
|
||||
|
||||
function canonicalize(value: unknown): unknown {
|
||||
if (Array.isArray(value)) return value.map(canonicalize);
|
||||
|
||||
@@ -4,10 +4,10 @@ import { Test } from '@nestjs/testing';
|
||||
import type { Server } from 'node:http';
|
||||
import request from 'supertest';
|
||||
import { AppModule } from '../src/app.module';
|
||||
import { TbankAccessService } from '../src/integrations/tbank/tbank-access.service';
|
||||
import { TbankClient } from '../src/integrations/tbank/tbank.client';
|
||||
import { configureApp } from '../src/main';
|
||||
import { TbankAccessService } from '../src/tbank/tbank-access.service';
|
||||
import { TbankClient } from '../src/tbank/tbank.client';
|
||||
import { PortfolioService } from '../src/tbank/portfolio.service';
|
||||
import { PortfolioService } from '../src/modules/investments/portfolio/application/portfolio.service';
|
||||
|
||||
describe('Portfolio structure HTTP contract', () => {
|
||||
let app: INestApplication<Server>;
|
||||
|
||||
+10
-4
@@ -1,16 +1,18 @@
|
||||
import {
|
||||
INestApplication,
|
||||
ConflictException,
|
||||
INestApplication,
|
||||
NotFoundException,
|
||||
ServiceUnavailableException,
|
||||
} from '@nestjs/common';
|
||||
import { JwtService } from '@nestjs/jwt';
|
||||
import { Test } from '@nestjs/testing';
|
||||
import request from 'supertest';
|
||||
import type { Server } from 'node:http';
|
||||
import request from 'supertest';
|
||||
import { AppModule } from '../src/app.module';
|
||||
import { configureApp } from '../src/main';
|
||||
import { StockService } from '../src/tbank/stock.service';
|
||||
import { StockIncomeService } from '../src/modules/investments/instruments/stocks/application/stock-income.service';
|
||||
import { StockMarketService } from '../src/modules/investments/instruments/stocks/application/stock-market.service';
|
||||
import { StockCatalogService } from '../src/modules/investments/instruments/stocks/application/stock-catalog.service';
|
||||
|
||||
const uid = 'e6123145-9665-43e0-8413-cd61b8aa9b13';
|
||||
describe('Stock HTTP contract', () => {
|
||||
@@ -27,7 +29,11 @@ describe('Stock HTTP contract', () => {
|
||||
);
|
||||
beforeAll(async () => {
|
||||
const module = await Test.createTestingModule({ imports: [AppModule] })
|
||||
.overrideProvider(StockService)
|
||||
.overrideProvider(StockCatalogService)
|
||||
.useValue(stocks)
|
||||
.overrideProvider(StockMarketService)
|
||||
.useValue(stocks)
|
||||
.overrideProvider(StockIncomeService)
|
||||
.useValue(stocks)
|
||||
.compile();
|
||||
app = module.createNestApplication();
|
||||
|
||||
@@ -4,10 +4,10 @@ import { Test } from '@nestjs/testing';
|
||||
import type { Server } from 'node:http';
|
||||
import request from 'supertest';
|
||||
import { AppModule } from '../src/app.module';
|
||||
import { MoexClient } from '../src/integrations/moex/moex.client';
|
||||
import { TbankAccessService } from '../src/integrations/tbank/tbank-access.service';
|
||||
import { TbankClient } from '../src/integrations/tbank/tbank.client';
|
||||
import { configureApp } from '../src/main';
|
||||
import { TbankAccessService } from '../src/tbank/tbank-access.service';
|
||||
import { TbankClient } from '../src/tbank/tbank.client';
|
||||
import { MoexClient } from '../src/tbank/moex.client';
|
||||
|
||||
describe('Upcoming events date filter HTTP boundary', () => {
|
||||
let app: INestApplication<Server>;
|
||||
|
||||
Reference in New Issue
Block a user