{
  "name": "should",
  "description": "test framework agnostic BDD-style assertions",
  "version": "1.2.2",
  "author": {
    "name": "TJ Holowaychuk",
    "email": "tj@vision-media.ca"
  },
  "repository": {
    "type": "git",
    "url": "git://github.com/visionmedia/should.js.git"
  },
  "homepage": "https://github.com/visionmedia/should.js",
  "contributors": [
    {
      "name": "Aseem Kishore",
      "email": "aseem.kishore@gmail.com"
    }
  ],
  "devDependencies": {
    "mocha": "*"
  },
  "keywords": [
    "test",
    "bdd",
    "assert"
  ],
  "main": "./lib/should.js",
  "engines": {
    "node": ">= 0.2.0"
  },
  "readme": "_should_ is an expressive, readable, test framework agnostic, assertion library for [node](http://nodejs.org).\n\nIt extends the Object prototype with a single non-enumerable getter that allows you to express how that object should behave.\n\n_should_ literally extends node's _assert_ module, in fact, it is node's assert module, for example `should.equal(str, 'foo')` will work, just as `assert.equal(str, 'foo')` would, and `should.AssertionError` **is** `assert.AssertionError`, meaning any test framework supporting this constructor will function properly with _should_.\n\n## Example\n```javascript\nvar user = {\n    name: 'tj'\n  , pets: ['tobi', 'loki', 'jane', 'bandit']\n};\n\nuser.should.have.property('name', 'tj');\nuser.should.have.property('pets').with.lengthOf(4);\n\nsomeAsyncTask(foo, function(err, result){\n  should.not.exist(err);\n  should.exist(result);\n  result.bar.should.equal(foo);\n});\n```\n## Installation\n\n    $ npm install should\n\n## assert extras\n\nAs mentioned above, _should_ extends node's _assert_. The returned object from `require('should')` is thus similar to the returned object from `require('assert')`, but it has one extra convenience method:\n```javascript\nshould.exist('hello')\nshould.exist([])\nshould.exist(null)  // will throw\n```\nThis is equivalent to `should.ok`, which is equivalent to `assert.ok`, but reads a bit better. It gets better, though:\n```javascript\nshould.not.exist(false)\nshould.not.exist('')\nshould.not.exist({})    // will throw\n```\nWe may add more _assert_ extras in the future... ;)\n\n## chaining assertions\n\nSome assertions can be chained, for example if a property is volatile we can first assert property existence:\n```javascript\nuser.should.have.property('pets').with.lengthOf(4)\n```\nwhich is essentially equivalent to below, however the property may not exist:\n```javascript\nuser.pets.should.have.lengthOf(4)\n```\nour dummy getters such as _and_ also help express chaining:\n```javascript\nuser.should.be.a('object').and.have.property('name', 'tj')\n```\n## exist (static)\n\nThe returned object from `require('should')` is the same object as `require('assert')`. So you can use `should` just like `assert`:\n```javascript\nshould.fail('expected an error!')\nshould.strictEqual(foo, bar)\n```\nIn general, using the Object prototype's _should_ is nicer than using these `assert` equivalents, because _should_ gives you access to the expressive and readable language described above:\n```javascript\nfoo.should.equal(bar)   // same as should.strictEqual(foo, bar) above\n```\nThe only exception, though, is when you can't be sure that a particular object exists. In that case, attempting to access the _should_ property may throw a TypeError:\n```javascript\nfoo.should.equal(bar)   // throws if foo is null or undefined!\n```\nFor this case, `require('should')` extends `require('assert')` with an extra convenience method to check whether an object exists:\n```javascript\nshould.exist({})\nshould.exist([])\nshould.exist('')\nshould.exist(0)\nshould.exist(null)      // will throw\nshould.exist(undefined) // will throw\n```\nYou can also check the negation:\n```javascript\nshould.not.exist(undefined)\nshould.not.exist(null)\nshould.not.exist('')    // will throw\nshould.not.exist({})    // will throw\n```\nOnce you know an object exists, you can safely use the _should_ property on it.\n\n## ok\n\nAssert truthfulness:\n```javascript\ntrue.should.be.ok\n'yay'.should.be.ok\n(1).should.be.ok\n```\nor negated:\n```javascript\nfalse.should.not.be.ok\n''.should.not.be.ok\n(0).should.not.be.ok\n```\n## true\n\nAssert === true:\n```javascript\ntrue.should.be.true\n'1'.should.not.be.true\n```\n## false\n\nAssert === false:\n```javascript\nfalse.should.be.false\n(0).should.not.be.false\n```\n## arguments\n\nAssert `Arguments`:\n```javascript\nvar args = (function(){ return arguments; })(1,2,3);\nargs.should.be.arguments;\n[].should.not.be.arguments;\n```\n## empty\n\nAsserts that length is 0:\n```javascript\n[].should.be.empty\n''.should.be.empty\n({ length: 0 }).should.be.empty\n```\n## eql\n\nequality:\n```javascript\n({ foo: 'bar' }).should.eql({ foo: 'bar' })\n[1,2,3].should.eql([1,2,3])\n```\n## equal\n\nstrict equality:\n```javascript\nshould.strictEqual(undefined, value)\nshould.strictEqual(false, value)\n(4).should.equal(4)\n'test'.should.equal('test')\n[1,2,3].should.not.equal([1,2,3])\n```\n## within\n\nAssert inclusive numeric range:\n```javascript\nuser.age.should.be.within(5, 50)\n```\n## a\n\nAssert __typeof__:\n```javascript\nuser.should.be.a('object')\n'test'.should.be.a('string')\n```\n## instanceof and instanceOf\n\nAssert __instanceof__ or __instanceOf__:\n```javascript\nuser.should.be.an.instanceof(User)\n[].should.be.an.instanceOf(Array)\n```\n## above\n\nAssert numeric value above the given value:\n```javascript\nuser.age.should.be.above(5)\nuser.age.should.not.be.above(100)\n```\n## below\n\nAssert numeric value below the given value:\n```javascript\nuser.age.should.be.below(100)\nuser.age.should.not.be.below(5)\n```\n## match\n\nAssert regexp match:\n```javascript\nusername.should.match(/^\\w+$/)\n```\n## length\n\nAssert _length_ property exists and has a value of the given number:\n```javascript\nuser.pets.should.have.length(5)\nuser.pets.should.have.a.lengthOf(5)\n```\nAliases: _lengthOf_\n\n## property\n\nAssert property exists and has optional value:\n```javascript\nuser.should.have.property('name')\nuser.should.have.property('age', 15)\nuser.should.not.have.property('rawr')\nuser.should.not.have.property('age', 0)\n```\n## ownProperty\n\nAssert own property (on the immediate object):\n```javascript\n({ foo: 'bar' }).should.have.ownProperty('foo')\n```\n## status(code)\n\n Asserts that `.statusCode` is `code`:\n```javascript\nres.should.have.status(200);\n```\n## header(field[, value])\n\n Asserts that a `.headers` object with `field` and optional `value` are present:\n```javascript\nres.should.have.header('content-length');\nres.should.have.header('Content-Length', '123');\nres.should.have.header('content-length', '123');\n```\n## json\n\n  Assert that Content-Type is \"application/json; charset=utf-8\"\n```javascript\nres.should.be.json\n```\n## html\n\n  Assert that Content-Type is \"text/html; charset=utf-8\"\n```javascript\nres.should.be.html\n```\n## include(obj)\n\nAssert that the given `obj` is present via `indexOf()`, so this works for strings, arrays, or custom objects implementing indexOf.\n\nAssert array value:\n```javascript\n[1,2,3].should.include(3)\n[1,2,3].should.include(2)\n[1,2,3].should.not.include(4)\n```\nAssert substring:\n```javascript\n'foo bar baz'.should.include('foo')\n'foo bar baz'.should.include('bar')\n'foo bar baz'.should.include('baz')\n'foo bar baz'.should.not.include('FOO')\n```\nAssert object includes another object:\n```javascript\nvar tobi = { name: 'Tobi', age: 1 };\nvar jane = { name: 'Jane', age: 5 };\nvar user = { name: 'TJ', pet: tobi };\n\nuser.should.include({ pet: tobi });\nuser.should.include({ pet: tobi, name: 'TJ' });\nuser.should.not.include({ pet: jane });\nuser.should.not.include({ name: 'Someone' });\n```\n## includeEql(obj)\n\nAssert that an object equal to the given `obj` is present in an Array:\n```javascript\n[[1],[2],[3]].should.includeEql([3])\n[[1],[2],[3]].should.includeEql([2])\n[[1],[2],[3]].should.not.includeEql([4])\n```\n## throw()\n\nAssert an exception is thrown:\n\n```js\n(function(){\n  throw new Error('fail');\n}).should.throw();\n```\n\nAssert an exception is not thrown:\n\n```js\n(function(){\n\n}).should.not.throw();\n```\nAssert exepection message matches string:\n\n```js\n(function(){\n  throw new Error('fail');\n}).should.throw('fail');\n```\n\nAssert exepection message matches regexp:\n\n```js\n(function(){\n  throw new Error('failed to foo');\n}).should.throw(/^fail/);\n```\n\n## throwError()\n\nAn alias of `throw`, its purpose is to be an option for those who run\n[jshint](https://github.com/jshint/node-jshint/) in strict mode.\n\n```js\n(function(){\n  throw new Error('failed to baz');\n}).should.throwError(/^fail.*/);\n```\n\n\n## keys\n\nAssert own object keys, which must match _exactly_,\nand will fail if you omit a key or two:\n\n    var obj = { foo: 'bar', baz: 'raz' };\n    obj.should.have.keys('foo', 'bar');\n    obj.should.have.keys(['foo', 'bar']);\n\n## Optional Error description\n\nAs it can often be difficult to ascertain exactly where failed assertions are coming from in your tests, an optional description parameter can be passed to several should matchers. The description will follow the failed assertion in the error:\n\n    (1).should.eql(0, 'some useful description')\n\n    AssertionError: expected 1 to equal 0 | some useful description\n      at Object.eql (/Users/swift/code/should.js/node_modules/should/lib/should.js:280:10)\n      ...\n\nThe methods that support this optional description are: `eql`, `equal`, `within`, `a`, `instanceof`, `above`, `below`, `match`, `length`, `property`, `ownProperty`, `include`, and `includeEql`.\n\n## Express example\n\nFor example you can use should with the [Expresso TDD Framework](http://github.com/visionmedia/expresso) by simply including it:\n\n    var lib = require('mylib')\n      , should = require('should');\n\n    module.exports = {\n      'test .version': function(){\n        lib.version.should.match(/^\\d+\\.\\d+\\.\\d+$/);\n      }\n    };\n\n## Running tests\n\nTo run the tests for _should_ simply update your git submodules and run:\n\n    $ make test\n\n## OMG IT EXTENDS OBJECT???!?!@\n\nYes, yes it does, with a single getter _should_, and no it won't break your code, because it does this **properly** with a non-enumerable property.\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2010-2011 TJ Holowaychuk &lt;tj@vision-media.ca&gt;\nCopyright (c) 2011 Aseem Kishore &lt;aseem.kishore@gmail.com&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
  "readmeFilename": "Readme.md",
  "bugs": {
    "url": "https://github.com/visionmedia/should.js/issues"
  },
  "_id": "should@1.2.2",
  "dist": {
    "shasum": "de2a9e27cb9dae77d67bc9b0b0b694a9f728e25f"
  },
  "_from": "should@~1.2.2",
  "_resolved": "https://registry.npmjs.org/should/-/should-1.2.2.tgz"
}
