2026-08-31 18:51:27 +00:00
|
|
|
import assert from "node:assert/strict";
|
|
|
|
|
import test from "node:test";
|
|
|
|
|
|
|
|
|
|
import { catalogsModule } from "./module";
|
|
|
|
|
|
|
|
|
|
test("catalogsModule compone el finder público de payment methods sin HTTP", async () => {
|
|
|
|
|
const setup = await catalogsModule.setup?.({
|
|
|
|
|
database: {},
|
|
|
|
|
transactionContext: {},
|
|
|
|
|
audit: { recordMutation: async () => ({ isFailure: false }) },
|
|
|
|
|
getService: () => ({}),
|
|
|
|
|
logger: { info: () => undefined },
|
|
|
|
|
} as never);
|
|
|
|
|
|
2026-09-10 11:26:33 +00:00
|
|
|
const paymentMethods = setup?.services?.paymentMethods as {
|
|
|
|
|
finder: { constructor: { name: string } };
|
|
|
|
|
};
|
2026-08-31 18:51:27 +00:00
|
|
|
assert.equal(paymentMethods.finder.constructor.name, "PaymentMethodPublicFinder");
|
|
|
|
|
});
|