Skip to content

Commit

Permalink
Fix test program description validator
Browse files Browse the repository at this point in the history
  • Loading branch information
samchon committed Feb 3, 2025
1 parent e3afd89 commit cd8e2bb
Showing 1 changed file with 7 additions and 21 deletions.
28 changes: 7 additions & 21 deletions test/features/migrate/test_http_migrate_route_comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,11 @@ export const test_http_migrate_route_comment = async (): Promise<void> => {
const route: IHttpMigrateRoute | undefined = migrate.routes.find(
(r) => r.path === "/shoppings/sellers/sales/{id}" && r.method === "put",
);
TestValidator.equals("comment")(route?.comment())(EXPECTED);
TestValidator.predicate("comment")(
() =>
!!route?.comment()?.startsWith("Update a sale.") &&
!!route
?.comment()
?.includes("Update a {@link IShoppingSale sale} with new information"),
);
};

const EXPECTED = `Update a sale.
Update a {@link IShoppingSale sale} with new information.
By the way, the sale actually does not being modified, but just make a new
{@link IShoppingSaleSnapshot snapshot} record of the sale. Its 1st purpose
is to keeping the integrity of the sale, due to modification of the sale
must not affect to the {@link IShoppingOrder orders} that already had been
applied to the sale.
The 2nd purpose is for the A/B tests. {@link IShoppingSeller Seller} needs
to demonstrate operating performance by chaining price, content, and
composition of the product. This snapshot concept would be helpful for it.
@param id Target sale's {@link IShoppingSale.id }
@param body New information of the sale\n@security bearer
@tag Sale`
.split("\r\n")
.join("\n");

0 comments on commit cd8e2bb

Please sign in to comment.