Skip to content

Commit

Permalink
we test for child node types on message
Browse files Browse the repository at this point in the history
  • Loading branch information
scottqueen-bixal committed Sep 3, 2021
1 parent 2ea0b2a commit dc268c9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/unit/character-count/character-count.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
});

0 comments on commit dc268c9

Please sign in to comment.