@@ -28,7 +28,7 @@ const testCases: TestCase[] = [
2828 "aggregation_keys": {"a": "0xf"},
2929 "debug_key": "1",
3030 "debug_reporting": true,
31- "destination": "https://a.test",
31+ "destination": [ "https://a.test", "https://1.2.3.4"] ,
3232 "destination_limit_priority": "1",
3333 "event_report_window": "3601",
3434 "expiry": "86400",
@@ -61,7 +61,7 @@ const testCases: TestCase[] = [
6161 aggregationKeys : new Map ( [ [ 'a' , 15n ] ] ) ,
6262 debugKey : 1n ,
6363 debugReporting : true ,
64- destination : new Set ( [ 'https://a.test' ] ) ,
64+ destination : new Set ( [ 'https://a.test' , 'https://1.2.3.4' ] ) ,
6565 destinationLimitPriority : 1n ,
6666 eventLevelEpsilon : 14 ,
6767 expiry : 86400 ,
@@ -116,7 +116,7 @@ const testCases: TestCase[] = [
116116 } ,
117117 {
118118 name : 'destination-url-components' ,
119- input : `{"destination": ["https://a.test/b?c=d#e", "https://x.Y.test", "https://sub.A.test/z"]}` ,
119+ input : `{"destination": ["https://a.test/b?c=d#e", "https://x.Y.test", "https://sub.A.test/z", "https://1.2.3.4/5" ]}` ,
120120 expectedWarnings : [
121121 {
122122 path : [ 'destination' , 0 ] ,
@@ -134,6 +134,10 @@ const testCases: TestCase[] = [
134134 path : [ 'destination' , 2 ] ,
135135 msg : 'duplicate value https://a.test' ,
136136 } ,
137+ {
138+ msg : 'URL components other than site (https://1.2.3.4) will be ignored' ,
139+ path : [ 'destination' , 3 ] ,
140+ } ,
137141 ] ,
138142 } ,
139143
0 commit comments