We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd58f16 commit 1658179Copy full SHA for 1658179
js/utils/__tests__/utils.test.js
@@ -709,6 +709,13 @@ describe("Utility Functions (logic-only)", () => {
709
expect(obj.viewVar).toBe(20);
710
expect(obj.modelMethod()).toBe("model");
711
expect(obj.viewMethod()).toBe("view");
712
+ it("should return empty string for missing nested property", () => {
713
+ const result = format("User: {user.age}", { user: { name: "Alice" } });
714
+ expect(result).toBe("User: ");
715
+ });
716
+ it("should return original string if no placeholders exist", () => {
717
+ const result = format("Hello world", { name: "User" });
718
+ expect(result).toBe("Hello world");
719
});
720
721
0 commit comments