@@ -47,14 +47,29 @@ describe(
4747 } ,
4848) ;
4949
50- test ( "Check that the ical base works" , { timeout : 45000 } , async ( ) => {
51- const response = await fetchWithRateLimit (
52- `${ baseEndpoint . replace ( "core" , "ical" ) } /ACM` ,
53- ) ;
54- expect ( response . status ) . toBe ( 200 ) ;
55- expect ( response . headers . get ( "Content-Disposition" ) ) . toEqual (
56- 'attachment; filename="calendar.ics"' ,
57- ) ;
58- const calendar = ical . sync . parseICS ( await response . text ( ) ) ;
59- expect ( calendar [ "vcalendar" ] [ "type" ] ) . toEqual ( "VCALENDAR" ) ;
60- } ) ;
50+ test (
51+ "Check that the ical base works and uses a default host of ACM" ,
52+ { timeout : 45000 } ,
53+ async ( ) => {
54+ const response = await fetchWithRateLimit (
55+ `${ baseEndpoint . replace ( "core" , "ical" ) } /ACM` ,
56+ ) ;
57+ const responseBase = await fetchWithRateLimit (
58+ `${ baseEndpoint . replace ( "core" , "ical" ) } ` ,
59+ ) ;
60+ expect ( response . status ) . toBe ( 200 ) ;
61+ expect ( responseBase . status ) . toBe ( 200 ) ;
62+ expect ( response . headers . get ( "Content-Disposition" ) ) . toEqual (
63+ 'attachment; filename="calendar.ics"' ,
64+ ) ;
65+ expect ( responseBase . headers . get ( "Content-Disposition" ) ) . toEqual (
66+ 'attachment; filename="calendar.ics"' ,
67+ ) ;
68+ const text1 = await response . text ( ) ;
69+ const text2 = await responseBase . text ( ) ;
70+ expect ( text1 ) . toStrictEqual ( text2 ) ;
71+
72+ const calendar = ical . sync . parseICS ( text1 ) ;
73+ expect ( calendar [ "vcalendar" ] [ "type" ] ) . toEqual ( "VCALENDAR" ) ;
74+ } ,
75+ ) ;
0 commit comments