Add new test cases for palindromic numbers

This commit is contained in:
dragi-ns 2021-11-04 14:44:23 +01:00
parent 6b0e0e55e3
commit 15d5b1c9bc
1 changed files with 12 additions and 0 deletions

View File

@ -19,4 +19,16 @@ describe('palindromes', () => {
test.skip('doesn\'t just always return true', () => {
expect(palindromes('ZZZZ car, a man, a maraca.')).toBe(false);
});
test.skip('works with numbers that are palindromes', () => {
expect(palindromes('1005001')).toBe(true);
});
test.skip('works with numbers that are not palindromes', () => {
expect(palindromes('12345')).toBe(false);
});
test.skip('works with datetime stamp using short digits', () => {
expect(palindromes('11/11/11 11:11')).toBe(true);
});
test.skip('works with date stamp using long digits', () => {
expect(palindromes('02/02/2020.')).toBe(true);
});
});