Skip to content

Commit 328dea0

Browse files
authored
chore: add isSlug test cases (#1602)
* test: add `isSlug` test cases * fix: remove duplicate test case
1 parent 6d87bfe commit 328dea0

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

test/validators.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10032,8 +10032,15 @@ describe('Validators', () => {
1003210032
it('should validate slug', () => {
1003310033
test({
1003410034
validator: 'isSlug',
10035-
args: ['cs_67CZ'],
10036-
valid: ['cs-cz', 'cscz'],
10035+
valid: [
10036+
'foo',
10037+
'foo-bar',
10038+
'foo_bar',
10039+
'foo-bar-foo',
10040+
'foo-bar_foo',
10041+
'foo-bar_foo*75-b4r-**_foo',
10042+
'foo-bar_foo*75-b4r-**_foo-&&',
10043+
],
1003710044
invalid: [
1003810045
'not-----------slug',
1003910046
'@#_$@',

0 commit comments

Comments
 (0)