{"name":"yeoman-assert","version":"2.0.0","description":"Assert utility from yeoman","license":"BSD","keywords":["assert","utility","helper","yeoman"],"homepage":"http://yeoman.io","author":{"name":"The Yeoman Team"},"repository":{"type":"git","url":"https://github.com/yeoman/yeoman-assert"},"files":["index.js"],"engines":{"node":">=0.10.0"},"scripts":{"test":"jshint *.js && jscs *.js && mocha"},"dependencies":{"lodash":"^3.6.0"},"devDependencies":{"jscs":"^1.12.0","jshint":"^2.6.3","mocha":"*"},"gitHead":"f7a5382305b4cd76178aaa673a06ffc0eedf5a9c","bugs":{"url":"https://github.com/yeoman/yeoman-assert/issues"},"_id":"yeoman-assert@2.0.0","_shasum":"83e7869a7732314c7347a08192802278563bfe02","_from":".","_npmVersion":"2.7.3","_nodeVersion":"0.12.1","_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"},{"name":"sboudrias","email":"admin@simonboudrias.com"},{"name":"addyosmani","email":"addyosmani@gmail.com"},{"name":"eddiemonge","email":"eddie+npm@eddiemonge.com"},{"name":"stefanbuck","email":"web@broud.de"}],"dist":{"shasum":"83e7869a7732314c7347a08192802278563bfe02","tarball":"http://registry-npm.ywwl.com/yeoman-assert/download/yeoman-assert-2.0.0.tgz","integrity":"sha512-ivvuYtnvMng4GeK4l4eUDzdTdkmZznUcMlYV5gqGg3rY6mzRex74vIMkby3B111lHZs4a0o/iLTk9+N+ucEj/g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDv1Pfc8nbSWGXsEhsfRlYKdSm+WPPlZBOXAPwIXvuXgQIhAOZZvBdkZh/Oap951m1A0rLlOLrwwdpWbl5embNYPVmE"}],"size":2940,"noattachment":false,"key":"/yeoman-assert/-/yeoman-assert-2.0.0.tgz"},"directories":{},"readme":"# yeoman-assert [![Build Status](https://travis-ci.org/yeoman/yeoman-assert.svg?branch=master)](https://travis-ci.org/yeoman/yeoman-assert)\n\n`yeoman-assert` is extending the native Node.js `assert` module. Every methods in `assert` also is available with `yeoman-assert`, plus some code scaffolding related assertion helpers.\n\n\n## Install\n\n```\n$ npm install yeoman-assert\n```\n\n\n## Usage\n\n```js\nconst assert = require('yeoman-assert');\n\nassert(true);\nassert.equal(1, 1);\n```\n\n\n## API\n\n### `assert.file()`\n\n- **path** (String|Array) Path to a file.\n\nAssert that a file exists.\n\n```js\nassert.file('templates/user.hbs');\n```\n\nAssert that each files in the array exists.\n\n```js\nassert.file(['templates/user.hbs', 'templates/user/edit.hbs']);\n\n```\n\n\n### `assert.noFile()`\n\n- **path** (String|Array) Path to a file.\n\nAssert that a file doesn't exists.\n\n```js\nassert.noFile('templates/user.hbs');\n```\n\nAssert that each of an array of files doesn't exist.\n\n```js\nassert.noFile(['templates/user.hbs', 'templates/user/edit.hbs']);\n\n```\n\n\n### `assert.fileContent()`\n\n- **file** (String|Array) Path to a file.\n- **reg** (Regex|String) Regex or string that will be used to search the file.\n\nAssert that a file's content matches a string.\n\n```js\nassert.fileContent('models/user.js', 'App.User = DS.Model.extend');\n\n```\n\nAssert that a file's content matches a regex.\n\n```js\nassert.fileContent('models/user.js', /App\\.User = DS\\.Model\\.extend/);\n```\n\nAssert that each of an array of files content matches a regex or string.\n\n```js\nassert.fileContent([\n   ['models/user.js', 'App.User = DS.Model.extend'],\n   ['controllers/user.js', /App\\.UserController = Ember\\.ObjectController\\.extend/]\n]);\n```\n\n\n### `assert.noFileContent()`\n\n- **file** (String|Array) Path to a file.\n- **reg** (Regex|String) Regex or string that will be used to search the file.\n\nAssert that a file's content does not match a string.\n\n```js\nassert.noFileContent('models/user.js', 'App.User = DS.Model.extend');\n\n```\n\nAssert that a file's content does not match a regex.\n\n```js\nassert.noFileContent('models/user.js', /App\\.User = DS\\.Model\\.extend/);\n```\n\nAssert that each of an array of files content does not match a regex or string.\n\n```js\nassert.noFileContent([\n   ['models/user.js', 'App.User = DS.Model.extend'],\n   ['controllers/user.js', /App\\.UserController = Ember\\.ObjectController\\.extend/]\n]);\n```\n\n### `assert.textEqual()`\n\n- **value** (String) A string.\n- **expected** (String) The expected value of the string.\n\nAssert that two strings are equal after standardization of newlines.\n\n```js\nassert.textEqual('I have a yellow cat', 'I have a yellow cat');\n```\n\n\n### `assert.implement()`\n\n- **subject** (Object) Subject implementing the façade.\n- **methods** (Object|Array) A façace, hash or array of keys to be implemented.\n\nAssert an Object implements an interface.\n\n```js\nassert.implement(fs, ['readFile']);\n```\n\n\n### `assert.notImplement()`\n\n- **subject** (Object) Subject not implementing the methods.\n- **methods** (Object|Array) Hash or array of method names to be implemented.\n\nAssert an Object doesn't implements any method of an interface.\n\n```js\nassert.notImplement(fs, ['foo']);\n```\n\n### `assert.objectContent()`\n\nAssert an object contains at least a set of keys\n\n```js\nvar anObject = {a: 1};\n\nassert.objectContent(anObject, {a: 2});\n```\n\n### `assert.noObjectContent()`\n\nAssert an object does not contain at least a set of keys\n\n```js\nvar anObject = {a: 1};\n\nassert.noObjectContent(anObject, {a: 1});\n```\n\n### `assert.jsonFileContent()`\n\nAssert a JSON file contains at least a set of keys (rely of `assert.objectContent()`)\n\n```js\nassert.jsonFileContent('path/to/file.json', {a: 2});\n```\n\n### `assert.noJsonFileContent()`\n\nAssert a JSON file does not contain at least a set of keys (rely of `assert.noObjectContent()`)\n\n```js\nassert.noJsonFileContent('path/to/file.json', {a: 1});\n```\n\n\n## Contribute\n\nSee the [contributing docs](http://yeoman.io/contributing/).\n\n\n## License\n\nBSD-2-Clause © Google\n","publish_time":1428458537716,"deprecated":"This package is deprecated. See: https://github.com/yeoman/yeoman/issues/1779","_cnpm_publish_time":1428458537716,"dist-tags":{"latest":"3.1.1"}}