@@ -142,17 +142,23 @@ describe('Content Collections - render()', () => {
142142 it ( 'getCollection should return new instances of the array to be mutated safely' , async ( ) => {
143143 const app = await fixture . loadTestAdapterApp ( ) ;
144144
145- let request = new Request ( 'http://example.com/sort-blog-collection ' ) ;
145+ let request = new Request ( 'http://example.com/' ) ;
146146 let response = await app . render ( request ) ;
147147 let html = await response . text ( ) ;
148148 let $ = cheerio . load ( html ) ;
149- assert . equal ( $ ( 'li' ) . first ( ) . text ( ) , 'Launch week!' ) ;
149+ const firstText = $ ( 'li' ) . first ( ) . text ( ) ;
150+
151+ request = new Request ( 'http://example.com/sort-blog-collection' ) ;
152+ response = await app . render ( request ) ;
153+ html = await response . text ( ) ;
154+ $ = cheerio . load ( html ) ;
155+ assert . notEqual ( $ ( 'li' ) . first ( ) . text ( ) , firstText ) ;
150156
151157 request = new Request ( 'http://example.com/' ) ;
152158 response = await app . render ( request ) ;
153159 html = await response . text ( ) ;
154160 $ = cheerio . load ( html ) ;
155- assert . equal ( $ ( 'li' ) . first ( ) . text ( ) , 'Hello world' ) ;
161+ assert . equal ( $ ( 'li' ) . first ( ) . text ( ) , firstText ) ;
156162 } ) ;
157163 } ) ;
158164
@@ -212,24 +218,5 @@ describe('Content Collections - render()', () => {
212218 assert . equal ( h2 . length , 1 ) ;
213219 assert . equal ( h2 . attr ( 'data-components-export-applied' ) , 'true' ) ;
214220 } ) ;
215-
216- it . skip ( 'Supports layout prop with recursive getCollection() call - DEPRECATED: layout props removed in Astro 5' , async ( ) => {
217- const response = await fixture . fetch ( '/with-layout-prop' , { method : 'GET' } ) ;
218- assert . equal ( response . status , 200 ) ;
219-
220- const html = await response . text ( ) ;
221- const $ = cheerio . load ( html ) ;
222-
223- const body = $ ( 'body' ) ;
224- assert . equal ( body . attr ( 'data-layout-prop' ) , 'true' ) ;
225-
226- const h1 = $ ( 'h1' ) ;
227- assert . equal ( h1 . length , 1 ) ;
228- assert . equal ( h1 . text ( ) , 'With Layout Prop' ) ;
229-
230- const h2 = $ ( 'h2' ) ;
231- assert . equal ( h2 . length , 1 ) ;
232- assert . equal ( h2 . text ( ) , 'Content with a layout prop' ) ;
233- } ) ;
234221 } ) ;
235222} ) ;
0 commit comments