test.js 538 B

123456789101112131415161718192021
  1. /*!
  2. * isobject <https://github.com/jonschlinkert/isobject>
  3. *
  4. * Copyright (c) 2014 Jon Schlinkert, contributors.
  5. * Licensed under the MIT License
  6. */
  7. var expect = require('chai').expect;
  8. var isObject = require('../');
  9. it('when null is passed it should return false.', function () {
  10. expect(isObject(null)).to.eql(false);
  11. });
  12. it('when [] is passed it should return false.', function () {
  13. expect(isObject([])).to.eql(false);
  14. });
  15. it('when {} is passed it should return true.', function () {
  16. expect(isObject({})).to.eql(true);
  17. });