Skip to content

Commit

Permalink
chore: add isSlug test cases (#1602)
Browse files Browse the repository at this point in the history
* test: add `isSlug` test cases

* fix: remove duplicate test case
  • Loading branch information
fedeci authored Mar 3, 2021
1 parent 6d87bfe commit 328dea0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -10032,8 +10032,15 @@ describe('Validators', () => {
it('should validate slug', () => {
test({
validator: 'isSlug',
args: ['cs_67CZ'],
valid: ['cs-cz', 'cscz'],
valid: [
'foo',
'foo-bar',
'foo_bar',
'foo-bar-foo',
'foo-bar_foo',
'foo-bar_foo*75-b4r-**_foo',
'foo-bar_foo*75-b4r-**_foo-&&',
],
invalid: [
'not-----------slug',
'@#_$@',
Expand Down

0 comments on commit 328dea0

Please sign in to comment.