chai-date-string

0.1.0 • Public • Published

chai-date-string

Usage example:

var chai = require('chai')
  , expect = chai.expect
  , chaiDateString = require('chai-date-string');
 
expect('2015-11-12').to.be.a.dateString(); // will pass
expect('2015-24-12').to.be.a.dateString(); // will fail

It will validate time part as well.

The later will fail with message: `AssertionError: expected '2015-24-12' to be a date string.

/chai-date-string/

    Package Sidebar

    Install

    npm i chai-date-string

    Weekly Downloads

    5,160

    Version

    0.1.0

    License

    ISC

    Last publish

    Collaborators

    • sceonteam
    • googoid
    • david.kasparov