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 895b769 commit 717a848Copy full SHA for 717a848
js/utils/__tests__/utils.test.js
@@ -292,5 +292,13 @@ describe("Utility Functions (logic-only)", () => {
292
const result = format("Static text", {});
293
expect(result).toBe("Static text");
294
});
295
+ it("should return empty string for missing nested property", () => {
296
+ const result = format("User: {user.age}", { user: { name: "Alice" } });
297
+ expect(result).toBe("User: ");
298
+ });
299
+ it("should return original string if no placeholders exist", () => {
300
+ const result = format("Hello world", { name: "User" });
301
+ expect(result).toBe("Hello world");
302
303
304
0 commit comments