{"name":"yeoman-assert","version":"2.2.2","description":"Assert utility from yeoman","homepage":"http://yeoman.io","author":{"name":"The Yeoman Team"},"files":["index.js"],"main":"index.js","keywords":["assert","utility","helper","yeoman"],"license":"BSD-2-Clause","repository":{"type":"git","url":"git+https://github.com/yeoman/yeoman-assert.git"},"engines":{"node":">=0.10.0"},"scripts":{"test":"gulp","prepublish":"gulp prepublish"},"dependencies":{"lodash":"^3.6.0","path-exists":"^2.1.0"},"devDependencies":{"eslint-config-xo-space":"^0.7.0","gulp":"^3.9.0","gulp-eslint":"^1.0.0","gulp-exclude-gitignore":"^1.0.0","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.0.0","gulp-nsp":"^2.1.0","gulp-plumber":"^1.0.0"},"eslintConfig":{"extends":"xo-space","env":{"mocha":true}},"gitHead":"ed7f3f08bf54ad89a18214c3ea4aa6b058b83a3a","bugs":{"url":"https://github.com/yeoman/yeoman-assert/issues"},"_id":"yeoman-assert@2.2.2","_shasum":"d2b15982f6a438a0d2319d8b5c1d65abc5b6dbea","_from":".","_npmVersion":"3.5.3","_nodeVersion":"6.9.1","_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"dist":{"shasum":"d2b15982f6a438a0d2319d8b5c1d65abc5b6dbea","tarball":"http://registry-npm.ywwl.com/yeoman-assert/download/yeoman-assert-2.2.2.tgz","integrity":"sha512-NmTyoCXhcMF4bFzNlno1sQ1DNkdkpyWXIK3HqJRHLzphMjc+viuwvk5gsWMiwgKEUsWFXa5+yIg+kfKRzc+rbw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMPXlkArCnXV7A3Y/qaScgfwh+tV6RpQZIhAzvp7oWpwIgfuKZJ51fbwA/OAR7zJINo4A3m37oCaLCRQMTZCjS35k="}],"size":3674,"noattachment":false,"key":"/yeoman-assert/-/yeoman-assert-2.2.2.tgz"},"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"},{"name":"arthurvr","email":"contact@arthurverschaeve.be"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/yeoman-assert-2.2.2.tgz_1481741501059_0.6514057847671211"},"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":1481741501314,"deprecated":"This package is deprecated. See: https://github.com/yeoman/yeoman/issues/1779","_cnpm_publish_time":1481741501314,"dist-tags":{"latest":"3.1.1"}}