feat(F-152): completed feature
This commit is contained in:
@@ -8,6 +8,12 @@ export { registerOrdersRoutes, type OrdersRoutesDeps } from './api/orders.routes
|
||||
export { OrderService } from './application/order-service.js';
|
||||
export { OrderStateTransitionError, OrderNotFoundError } from './domain/errors.js';
|
||||
export { ALLOWED_TRANSITIONS, isTransitionAllowed } from './domain/order.js';
|
||||
export {
|
||||
sendOrderStatusEmail,
|
||||
buildOrderStatusEmail,
|
||||
ORDER_STATE_LABELS,
|
||||
type OrderStatusNotificationInput,
|
||||
} from './infrastructure/order-status-mailer.js';
|
||||
export type {
|
||||
OrderEvent,
|
||||
OrderEventPublisher,
|
||||
|
||||
11
project/src/modules/orders/tests/orders-index.test.ts
Normal file
11
project/src/modules/orders/tests/orders-index.test.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import * as OrdersIndex from '../index.js';
|
||||
|
||||
describe('orders barrel exports (F-152)', () => {
|
||||
it('re-exports the order-status email helpers used for confirmation emails', () => {
|
||||
expect(typeof OrdersIndex.sendOrderStatusEmail).toBe('function');
|
||||
expect(typeof OrdersIndex.buildOrderStatusEmail).toBe('function');
|
||||
expect(OrdersIndex.ORDER_STATE_LABELS.PAID).toBe('Pagado');
|
||||
expect(OrdersIndex.ORDER_STATE_LABELS.SHIPPED).toBe('Enviado');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user