@@ -2,10 +2,21 @@ import Test from '../helpers/test';
22import itsInvalid from '../itsInvalid' ;
33import itsValid from '../itsValid' ;
44
5- const validData = 'http://www.example.com' ;
6-
75export default ( test : Test ) => {
86 itsInvalid ( 'http' , 'not an IRI' , test ) ;
97 itsInvalid ( 10 , 'not a String' , test ) ;
10- itsValid ( validData , test ) ;
8+ itsValid ( 'http://www.example.com' , test ) ;
9+
10+ // https://mathiasbynens.be/demo/url-regex
11+ itsValid ( 'http://fo-o.com/blah_blah_(wikipedia)#cite-1' , test ) ;
12+ itsValid ( 'https://www.example.com/foo/?bar=b%20az&inga=42&quux' , test ) ;
13+ itsValid ( 'http://userid:password@example.com:8080/' , test ) ;
14+ itsValid ( 'http://userid:password@example.com/' , test ) ;
15+ itsValid ( 'http://142.42.1.1:8080/' , test ) ;
16+ itsValid ( 'http://foo.com/unicode_(✪)_in_parens' , test ) ;
17+ itsValid ( 'http://foo.com/(something)?after=parens' , test ) ;
18+ itsValid ( 'http://code.google.com/events/#&product=browser' , test ) ;
19+ itsValid ( 'ftp://foo.bar/baz' , test ) ;
20+ itsValid ( 'http://⌘➡例子.测试✪उदाहरण.परीकإختبار/䨹' , test ) ;
21+ itsValid ( 'http://-.~_!$&\'()*+,;=:%40:80%2f::::::@example.com' , test ) ;
1122} ;
0 commit comments