From dc268c9758700f23482b21447e0c869c1a109a91 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Fri, 3 Sep 2021 13:16:24 -0400 Subject: [PATCH] we test for child node types on message --- spec/unit/character-count/character-count.spec.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spec/unit/character-count/character-count.spec.js b/spec/unit/character-count/character-count.spec.js index d7f928fc54..71ae6bdd82 100755 --- a/spec/unit/character-count/character-count.spec.js +++ b/spec/unit/character-count/character-count.spec.js @@ -96,4 +96,10 @@ describe("character count component", () => { assert.strictEqual(input.validationMessage, VALIDATION_MESSAGE); assert.strictEqual(message.classList.contains(MESSAGE_INVALID_CLASS), true); }); + + it("should not allow for innerHTML of child elements ", () => { + Array.from(message.childNodes).forEach((childNode) => { + assert.strictEqual(childNode.nodeType, Node.TEXT_NODE); + }); + }); });