UNPKG

motion

Version:

motion - moving development forward

59 lines (58 loc) 3.99 kB
{ "_args": [ [ "assert@https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", "/Users/nw/flint/packages/flint" ] ], "_from": "assert@>=1.1.1 <2.0.0", "_id": "assert@1.3.0", "_inCache": true, "_location": "/assert", "_phantomChildren": {}, "_requested": { "name": "assert", "raw": "assert@https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", "rawSpec": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", "scope": null, "spec": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", "type": "remote" }, "_requiredBy": [ "/node-libs-browser" ], "_resolved": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", "_shasum": "03939a622582a812cc202320a0b9a56c9b815849", "_shrinkwrap": null, "_spec": "assert@https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", "_where": "/Users/nw/flint/packages/flint", "bugs": { "url": "https://github.com/defunctzombie/commonjs-assert/issues" }, "dependencies": { "util": "0.10.3" }, "description": "commonjs assert - node.js api compatible", "devDependencies": { "mocha": "~1.21.4", "zuul": "~1.10.2" }, "homepage": "https://github.com/defunctzombie/commonjs-assert", "keywords": [ "assert" ], "license": "MIT", "main": "./assert.js", "name": "assert", "optionalDependencies": {}, "readme": "# assert\n\n[![Build Status](https://travis-ci.org/defunctzombie/commonjs-assert.svg?branch=master)](https://travis-ci.org/defunctzombie/commonjs-assert)\n\nThis module is used for writing unit tests for your applications, you can access it with require('assert').\n\nThe API is derived from the [commonjs 1.0 unit testing](http://wiki.commonjs.org/wiki/Unit_Testing/1.0) spec and the [node.js assert module](http://nodejs.org/api/assert.html)\n\n## assert.fail(actual, expected, message, operator)\nThrows an exception that displays the values for actual and expected separated by the provided operator.\n\n## assert(value, message), assert.ok(value, [message])\nTests if value is truthy, it is equivalent to assert.equal(true, !!value, message);\n\n## assert.equal(actual, expected, [message])\nTests shallow, coercive equality with the equal comparison operator ( == ).\n\n## assert.notEqual(actual, expected, [message])\nTests shallow, coercive non-equality with the not equal comparison operator ( != ).\n\n## assert.deepEqual(actual, expected, [message])\nTests for deep equality.\n\n## assert.notDeepEqual(actual, expected, [message])\nTests for any deep inequality.\n\n## assert.strictEqual(actual, expected, [message])\nTests strict equality, as determined by the strict equality operator ( === )\n\n## assert.notStrictEqual(actual, expected, [message])\nTests strict non-equality, as determined by the strict not equal operator ( !== )\n\n## assert.throws(block, [error], [message])\nExpects block to throw an error. error can be constructor, regexp or validation function.\n\nValidate instanceof using constructor:\n\n```javascript\nassert.throws(function() { throw new Error(\"Wrong value\"); }, Error);\n```\n\nValidate error message using RegExp:\n\n```javascript\nassert.throws(function() { throw new Error(\"Wrong value\"); }, /value/);\n```\n\nCustom error validation:\n\n```javascript\nassert.throws(function() {\n throw new Error(\"Wrong value\");\n}, function(err) {\n if ( (err instanceof Error) && /value/.test(err) ) {\n return true;\n }\n}, \"unexpected error\");\n```\n\n## assert.doesNotThrow(block, [message])\nExpects block not to throw an error, see assert.throws for details.\n\n## assert.ifError(value)\nTests if value is not a false value, throws if it is a true value. Useful when testing the first argument, error in callbacks.\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git://github.com/defunctzombie/commonjs-assert.git" }, "scripts": { "test": "mocha --ui qunit test.js && zuul -- test.js" }, "version": "1.3.0" }