diff --git a/src/core/dom.js b/src/core/dom.js index 80bd3e6ad..ad3c42659 100644 --- a/src/core/dom.js +++ b/src/core/dom.js @@ -532,7 +532,7 @@ const escape_css_id = (id) => { }; /** - * Get a universally unique id (uuid) for a DOM element. + * Set and get a universally unique id (uuid) for a DOM element. * * This method returns a uuid for the given element. On the first call it will * generate a uuid and store it on the element. diff --git a/src/core/uuid.test.js b/src/core/uuid.test.js index d70c337a0..fdfd74f7b 100644 --- a/src/core/uuid.test.js +++ b/src/core/uuid.test.js @@ -19,4 +19,8 @@ describe("uuid", function () { window.crypto.randomUUID = orig_randomUUID; }); + + it("the uuid is unique", function () { + expect(create_uuid()).not.toBe(create_uuid()); + }); });