Skip to content

Commit ce29b50

Browse files
committed
test(isUUID): add test for invalid option
1 parent eda5d5c commit ce29b50

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

test/validators.test.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5683,6 +5683,30 @@ describe('Validators', () => {
56835683
'AAAAAAAA-1111-1111-AAAG-111111111111',
56845684
],
56855685
});
5686+
test({
5687+
validator: 'isUUID',
5688+
args: ['invalid'],
5689+
valid: [],
5690+
invalid: [
5691+
'',
5692+
'xxxA987FBC9-4BED-3078-CF07-9141BA07C9F3',
5693+
'A987FBC9-4BED-3078-CF07-9141BA07C9F3',
5694+
'A987FBC9-4BED-3078-CF07-9141BA07C9F3xxx',
5695+
'A987FBC94BED3078CF079141BA07C9F3',
5696+
'934859',
5697+
'987FBC9-4BED-3078-CF07A-9141BA07C9F3',
5698+
'AAAAAAAA-1111-1111-AAAG-111111111111',
5699+
'9deb20fe-a6e0-355c-81ea-288b009e4f6d',
5700+
'A987FBC9-4BED-4078-8F07-9141BA07C9F3',
5701+
'A987FBC9-4BED-5078-AF07-9141BA07C9F3',
5702+
'A987FBC9-4BED-6078-AF07-9141BA07C9F3',
5703+
'018C544A-D384-7000-BB74-3B1738ABE43C',
5704+
'A987FBC9-4BED-8078-AF07-9141BA07C9F3',
5705+
'00000000-0000-0000-0000-000000000000',
5706+
'ffffffff-ffff-ffff-ffff-ffffffffffff',
5707+
'FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF',
5708+
],
5709+
});
56865710
});
56875711

56885712
it('should validate a string that is in another string or array', () => {

0 commit comments

Comments
 (0)