Skip to content

Commit b3a503a

Browse files
committed
Add unicode based tests for RabinKarp.
1 parent e7d22b4 commit b3a503a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/algorithms/string/rabin-karp/__test__/rabinKarp.test.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ describe('rabinKarp', () => {
3737
it('should work with UTF symbols', () => {
3838
expect(rabinKarp('a\u{ffff}', '\u{ffff}')).toBe(1);
3939
expect(rabinKarp('\u0000耀\u0000', '耀\u0000')).toBe(1);
40-
// expect(rabinKarp('a\u{10000}', '\u{10000}')).toBe(1);
40+
expect(rabinKarp('a\u{20000}', '\u{20000}')).toBe(1);
41+
expect(rabinKarp('ab\u{20005}a', '\u{20005}a')).toBe(2);
4142
});
4243
});

0 commit comments

Comments
 (0)