Update tests fail messages
This commit is contained in:
parent
54d145a526
commit
6c4674fe9a
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue