import { formatYearCaption } from './formatYearCaption' ; const date = new Date ( 2022 , 10 , 21 ) ; test ( 'should return the formatted weekday name' , ( ) => { expect ( formatYearCaption ( date ) ) . toEqual ( '2022' ) ; } ) ;