to be a moment

  • <any> [not] to be a moment

Passes if the subject is a moment instance.

expect(moment(), 'to be a moment');
expect(new Date(), 'not to be a moment');

When the assertion fails you'll get this output:

expect(new Date('2015-01-01'), 'to be a moment');
expected new Date('Thu, 01 Jan 2015 00:00:00 GMT'to be a moment