@@ -111,19 +111,17 @@ describe('astro image service', () => {
111111 assert . equal ( height , originalHeight ) ;
112112 } ) ;
113113
114- // To match old behavior, we should upscale if the requested size is larger than the original
115- it ( 'does upscale image if requested size is larger than original and fit is unset' , async ( ) => {
114+ it ( 'does not upscale image if requested size is larger than original and fit is unset' , async ( ) => {
116115 const url = new URL ( src ) ;
117116 url . searchParams . set ( 'w' , '3000' ) ;
118117 url . searchParams . set ( 'h' , '2000' ) ;
119118 url . searchParams . delete ( 'fit' ) ;
120119 const { width, height } = await getImageDimensionsFromFixture ( fixture , url ) ;
121- assert . equal ( width , 3000 ) ;
122- assert . equal ( height , 2000 ) ;
120+ assert . equal ( width , originalWidth ) ;
121+ assert . equal ( height , originalHeight ) ;
123122 } ) ;
124123
125- // To match old behavior, we should upscale if the requested size is larger than the original
126- it ( 'does not upscale is only one dimension is provided and fit is set' , async ( ) => {
124+ it ( 'does not upscale if only one dimension is provided and fit is set' , async ( ) => {
127125 const url = new URL ( src ) ;
128126 url . searchParams . set ( 'w' , '3000' ) ;
129127 url . searchParams . delete ( 'h' ) ;
0 commit comments