Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
hannojg committed Sep 26, 2024
1 parent 2ededdd commit 02f562d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/unit/SuffixUkkonenTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ describe('SuffixUkkonenTree', () => {
tree.build();
expect(tree.findSubstring(stringToNumeric('an'))).toEqual(expect.arrayContaining([1, 3, 8, 10]));
});

it('should convert string to numeric with a list of chars to skip', () => {
expect(stringToNumeric('abcabc', new Set(['b']))).toEqual([0, 2, 0, 2]);
});
});

0 comments on commit 02f562d

Please sign in to comment.