Update tests fail messages

This commit is contained in:
Chi-Hsuan Huang 2022-05-24 11:14:44 +08:00
parent 54d145a526
commit 6c4674fe9a
1 changed files with 3 additions and 3 deletions

View File

@ -79,7 +79,7 @@ describe( 'toMoment', () => {
it( 'should handle isoFormat dates', () => {
const myMoment = toMoment( 'YYYY', '2018-04-15' );
if ( myMoment === null ) fail( 'it should not reach here' );
if ( myMoment === null ) fail( 'myMoment should not be null' );
expect( moment.isMoment( myMoment ) ).toBe( true );
expect( myMoment.isValid() ).toBe( true );
@ -87,7 +87,7 @@ describe( 'toMoment', () => {
it( 'should handle local formats', () => {
const longDate = toMoment( 'MMMM D, YYYY', 'April 15, 2018' );
if ( longDate === null ) fail( 'it should not reach here' );
if ( longDate === null ) fail( 'longDate should not be null' );
expect( moment.isMoment( longDate ) ).toBe( true );
expect( longDate.isValid() ).toBe( true );
@ -96,7 +96,7 @@ describe( 'toMoment', () => {
expect( longDate.year() ).toBe( 2018 );
const shortDate = toMoment( 'DD/MM/YYYY', '15/04/2018' );
if ( shortDate === null ) fail( 'it should not reach here' );
if ( shortDate === null ) fail( 'shortDate should not be null' );
expect( moment.isMoment( shortDate ) ).toBe( true );
expect( shortDate.isValid() ).toBe( true );