Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

Commit

Permalink
Release 8.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
btd committed Jan 10, 2016
1 parent 4ad9880 commit 57a2013
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
5 changes: 5 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
8.1.0 / 2016-01-10
==================

* Add .Date() assertion to test if given object is Date instance

8.0.2 / 2015-12-18
==================

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "should",
"description": "test framework agnostic BDD-style assertions",
"version": "8.0.2",
"version": "8.1.0",
"author": "TJ Holowaychuk <tj@vision-media.ca> and contributors",
"repository": {
"type": "git",
Expand Down
14 changes: 13 additions & 1 deletion should.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* should - test framework agnostic BDD-style assertions
* @version v8.0.2
* @version v8.1.0
* @author TJ Holowaychuk <tj@vision-media.ca> and contributors
* @link https://github.com/shouldjs/should.js
* @license MIT
Expand Down Expand Up @@ -2459,6 +2459,18 @@ module.exports = function(should, Assertion) {
this.have.instanceOf(Error);
});

/**
* Assert given object is a date
* @name Date
* @memberOf Assertion
* @category assertion types
*/
Assertion.add('Date', function() {
this.params = {operator: 'to be a date'};

this.have.instanceOf(Date);
});

/**
* Assert given object is null
* @name null
Expand Down
6 changes: 3 additions & 3 deletions should.min.js

Large diffs are not rendered by default.

0 comments on commit 57a2013

Please sign in to comment.