Skip to content

Commit

Permalink
added test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
mnomanmemon committed Oct 20, 2024
1 parent ae146d2 commit 0ca5efb
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/validators.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15459,4 +15459,21 @@ describe('Validators', () => {
],
});
});
it('should validate Palindromes', () => {
test({
validator: 'isPalindrome',
valid: [
'race car',
'A man, a plan, a canal. Panama',
'never odd or even',
'My age is 0, 0 si ega ym',
'civic',
],
invalid: [
'not a palindrome',
'nope',
'name is alan'

Check failure on line 15475 in test/validators.test.js

View workflow job for this annotation

GitHub Actions / Run tests on Node.js 20

Missing trailing comma

Check failure on line 15475 in test/validators.test.js

View workflow job for this annotation

GitHub Actions / Run tests on Node.js 18

Missing trailing comma

Check failure on line 15475 in test/validators.test.js

View workflow job for this annotation

GitHub Actions / Run tests on Node.js 16

Missing trailing comma

Check failure on line 15475 in test/validators.test.js

View workflow job for this annotation

GitHub Actions / Run tests on Node.js 14

Missing trailing comma

Check failure on line 15475 in test/validators.test.js

View workflow job for this annotation

GitHub Actions / Run tests on Node.js 12

Missing trailing comma

Check failure on line 15475 in test/validators.test.js

View workflow job for this annotation

GitHub Actions / Run tests on Node.js 10

Missing trailing comma

Check failure on line 15475 in test/validators.test.js

View workflow job for this annotation

GitHub Actions / Run tests on Node.js 8

Missing trailing comma
],
});
});
});

0 comments on commit 0ca5efb

Please sign in to comment.