Skip to content

Commit

Permalink
chore(common/web): add test cases for non-number in order and tertiar…
Browse files Browse the repository at this point in the history
…y strings
  • Loading branch information
markcsinclair committed Dec 19, 2024
1 parent 0585b3f commit 1ae53a0
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions common/web/types/tests/kmx/kmx-plus/element-string.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,21 @@ describe('Test of ElementString', () => {
];
assert.deepEqual(actual, expected);
});
it.skip('can handle non-number in order string', () => {
const sections = { strs: new Strs() };
sections.strs.allocString = stubStrsAllocString_Char;
const actual = ElementString.fromStrings(
sections,
"𐌰𐌱𐌲",
"1 A 3",
);
const expected = [
initElemElement(GOTHIC_A, undefined, 1),
initElemElement(GOTHIC_B, undefined, 0),
initElemElement(GOTHIC_C, undefined, 3),
];
assert.deepEqual(actual, expected);
});
it('can apply tertiary string', () => {
const sections = { strs: new Strs() };
sections.strs.allocString = stubStrsAllocString_Char;
Expand Down Expand Up @@ -193,6 +208,22 @@ describe('Test of ElementString', () => {
];
assert.deepEqual(actual, expected);
});
it.skip('can handle non-number in tertiary string', () => {
const sections = { strs: new Strs() };
sections.strs.allocString = stubStrsAllocString_Char;
const actual = ElementString.fromStrings(
sections,
"𐌰𐌱𐌲",
null,
"1 A 3",
);
const expected = [
initElemElement(GOTHIC_A, undefined, 0, 1),
initElemElement(GOTHIC_B, undefined, 0, 0),
initElemElement(GOTHIC_C, undefined, 0, 3),
];
assert.deepEqual(actual, expected);
});
it('can apply tertiary_base string', () => {
const sections = { strs: new Strs() };
sections.strs.allocString = stubStrsAllocString_Char;
Expand Down

0 comments on commit 1ae53a0

Please sign in to comment.