chore(common/web): add two more test cases for ElementString.isEqual()

This commit is contained in:
Dr Mark C. Sinclair 2025-01-09 11:27:52 +00:00
parent c615f82db2
commit 704486ae2e

View file

@ -375,6 +375,16 @@ describe('Test of ElementString', () => {
const two = ElementString.fromStrings(sections, ["𐌰", "𐌱", "𐌲"]);
assert.isTrue(one.isEqual(two));
});
it('returns false when ElementStrings are different lengths', () => {
const one = ElementString.fromStrings(sections, ["𐌰", "𐌱", "𐌲"]);
const two = ElementString.fromStrings(sections, ["𐌰", "𐌱"]);
assert.isFalse(one.isEqual(two));
});
it('returns false when ElementStrings have different ElemElements', () => {
const one = ElementString.fromStrings(sections, ["𐌰", "𐌱", "𐌲"]);
const two = ElementString.fromStrings(sections, ["𐌰", "𐌱", "𐌳"]);
assert.isFalse(one.isEqual(two));
});
});
});
});