Skip to content

Commit 2cf0776

Browse files
committed
test: no-use-before-define 규칙 변경에 따른 테스트 코드 수정
1 parent 0d3e88f commit 2cf0776

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

test/e2e/order.e2e.spec.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,6 @@ import { ProductSaleStatus } from '../../src/api/order/domain/product-sale-statu
1111
import { OrderRepository } from '../../src/api/order/repository/order.repository';
1212
import { OrderProductRepository } from '../../src/api/order/repository/order-product.repository';
1313

14-
function createProduct(
15-
productNumber: string,
16-
type: ProductType,
17-
price: number,
18-
) {
19-
return Product.of(
20-
productNumber,
21-
type,
22-
ProductSaleStatus.ON,
23-
'상품 이름',
24-
price,
25-
);
26-
}
27-
2814
describe('OrderController (e2e)', () => {
2915
let app: INestApplication;
3016
let productRepository: ProductRepository;
@@ -80,5 +66,19 @@ describe('OrderController (e2e)', () => {
8066
{ productNumber: 'P0002', price: 3000 },
8167
]);
8268
});
69+
70+
function createProduct(
71+
productNumber: string,
72+
type: ProductType,
73+
price: number,
74+
) {
75+
return Product.of(
76+
productNumber,
77+
type,
78+
ProductSaleStatus.ON,
79+
'상품 이름',
80+
price,
81+
);
82+
}
8383
});
8484
});

test/integration/order.service.int.spec.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,6 @@ import { ProductType } from '../../src/api/order/domain/product-type';
1111
import { ProductSaleStatus } from '../../src/api/order/domain/product-sale-status';
1212
import { OrderProductRepository } from '../../src/api/order/repository/order-product.repository';
1313

14-
function createProduct(
15-
productNumber: string,
16-
type: ProductType,
17-
price: number,
18-
) {
19-
return Product.of(
20-
productNumber,
21-
type,
22-
ProductSaleStatus.ON,
23-
'상품 이름',
24-
price,
25-
);
26-
}
27-
2814
describe('OrderService (Integration)', () => {
2915
let sut: OrderService;
3016
let dataSource: DataSource;
@@ -89,5 +75,19 @@ describe('OrderService (Integration)', () => {
8975
]),
9076
);
9177
});
78+
79+
function createProduct(
80+
productNumber: string,
81+
type: ProductType,
82+
price: number,
83+
) {
84+
return Product.of(
85+
productNumber,
86+
type,
87+
ProductSaleStatus.ON,
88+
'상품 이름',
89+
price,
90+
);
91+
}
9292
});
9393
});

0 commit comments

Comments
 (0)