Browse files

Added tests for 'object' detection, and extended 'array' ones.

  • Loading branch information...
1 parent d998ecd commit 4005823b3241158eb134f9495cb91b2635551282 @rauchg rauchg committed Feb 4, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 test/expect.js
View
12 test/expect.js
@@ -133,6 +133,18 @@ describe('expect', function () {
it('should test arrays', function () {
expect([]).to.be.a('array');
expect([]).to.be.an('array');
+
+ err(function () {
+ expect({}).to.be.an('array');
+ }, 'expected {} to be an array');
+ });
+
+ it('should test objects', function () {
+ expect({}).to.be.an('object');
+
+ err(function () {
+ expect(null).to.be.an('object');
+ }, 'expected null to be an object');
});
it('should test .equal()', function () {

0 comments on commit 4005823

Please sign in to comment.