Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

unexpected-date

sushantdhiman5.2kMIT2.0.0

Unexpected plugin for date/time assertions

unexpected, unexpected.js, date, time, datetime, test, assert, assertions

readme

Unexpected-date

NPM version Build Status Coverage Status Dependency Status

Support for useful date/time assertions for Unexpected.js

Table of Contents

Why

Use this module if you are looking for

  • Assertions on native Date objects
  • Dependency free light-weight module

Installation

You will need `unexpected@10.32.0` or above to use this module.

Node.js

$ npm install --save-dev unexpected-date
$ yarn add --dev unexpected-date
var expect = require("unexpected").clone();
expect.use(require("unexpected-date"));

Documentation

Checkout documentation site here

Assertions Available

  • to be after
  • to be before
  • to be [inclusively] between
  • to be close to
  • to be same or after
  • to be same or before
  • to equal date
  • to equal time

Notes

This module is inspired from unexpected-moment assertions.