File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ describe('Feed generator', () => {
256256 const result = generator ( locals , feedCfg . type , feedCfg . path ) ;
257257
258258 const { items } = await p ( result . data ) ;
259- const postImg = items . filter ( ( { image } ) => image . length ) [ 0 ] ;
259+ const [ postImg ] = items . filter ( ( { image } ) => image . length ) ;
260260 postImg . image . length . should . not . eql ( 0 ) ;
261261 } ;
262262
@@ -280,7 +280,7 @@ describe('Feed generator', () => {
280280 const feedCfg = hexo . config . feed ;
281281 const result = generator ( locals , feedCfg . type , feedCfg . path ) ;
282282 const { items } = await p ( result . data ) ;
283- const postImg = items . filter ( ( { image } ) => image . length ) [ 0 ] ;
283+ const [ postImg ] = items . filter ( ( { image } ) => image . length ) ;
284284
285285 postImg . image . should . eql ( full_url_for . call ( hexo , 'test.png' ) ) ;
286286 } ) ;
You can’t perform that action at this time.
0 commit comments