File tree Expand file tree Collapse file tree 3 files changed +31
-30
lines changed
src/components/Collaborative/hooks Expand file tree Collapse file tree 3 files changed +31
-30
lines changed Original file line number Diff line number Diff line change 55 " json" ,
66 " ts"
77 ],
8- "rootDir" : " ./" ,
8+ "rootDir" : " .. /" ,
99 "testRegex" : " .*\\ .spec\\ .ts$" ,
1010 "transform" : {
1111 "^.+\\ .(t|j)s$" : " ts-jest"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ describe ( "URL Validation Tests" , ( ) => {
2+ const URL_PATTERN =
3+ / ^ ( f t p | h t t p | h t t p s ) : \/ \/ [ ^ " ] + \. [ a - z A - Z ] { 2 , } ( \/ | \? | # | $ ) / ;
4+
5+ const validUrls = [
6+ "https://example.com" ,
7+ "https://example.br" ,
8+ "https://example.org" ,
9+ "https://example.net" ,
10+ "https://example.edu" ,
11+ "https://example.gov" ,
12+ "https://example.mil" ,
13+ "https://example.co" ,
14+ "https://example.info" ,
15+ "https://example.io" ,
16+ "https://example.biz" ,
17+ "https://example.us" ,
18+ "https://example.uk" ,
19+ "ftp://example.com" ,
20+ "http://example.co" ,
21+ "https://subdomain.example.org"
22+ ] ;
23+
24+ validUrls . forEach ( ( url ) => {
25+ it ( `should accept the URL: ${ url } ` , ( ) => {
26+ expect ( URL_PATTERN . test ( url ) ) . toBe ( true ) ;
27+ } ) ;
28+ } ) ;
29+ } ) ;
30+ export { }
You can’t perform that action at this time.
0 commit comments