{"name":"yeoman-assert","version":"3.1.0","description":"Assert utility from yeoman","license":"BSD-2-Clause","repository":{"type":"git","url":"git+https://github.com/yeoman/yeoman-assert.git"},"homepage":"http://yeoman.io","author":{"name":"Yeoman team"},"engines":{"node":">=4"},"scripts":{"test":"gulp","prepublish":"gulp prepublish"},"files":["index.js"],"keywords":["assert","assertion","test","testing","utility","helper","yeoman"],"devDependencies":{"eslint":"^3.15.0","eslint-config-xo-space":"^0.15.0","gulp":"^3.9.0","gulp-eslint":"^3.0.1","gulp-exclude-gitignore":"^1.0.0","gulp-istanbul":"^1.1.1","gulp-mocha":"^3.0.1","gulp-nsp":"^2.1.0","gulp-plumber":"^1.0.0"},"eslintConfig":{"extends":"xo-space","env":{"mocha":true}},"gitHead":"ae8dc7337eb7d7728672aa0648d3b6d1766c803f","bugs":{"url":"https://github.com/yeoman/yeoman-assert/issues"},"_id":"yeoman-assert@3.1.0","_npmVersion":"5.0.3","_nodeVersion":"8.1.3","_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"dist":{"integrity":"sha512-s5qwXatpdiqVJTwPj92jiE7f7RYKrbZsMZk2koic4hoQPbPwyQrGkaxGEvwal0Mf/dXkVpmfO3wVZCl7aU6uFQ==","shasum":"ad89ab4616d697f98b1a3eb8a1b63e8e315a89e8","tarball":"http://registry-npm.ywwl.com/yeoman-assert/download/yeoman-assert-3.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPXF97Uq9B3FShrSYU3cANbJfxj/ZI4NQhLDGIqTHGWQIgXTKPQkglUC+ZNn1urrMVZqlpfzVjiYi3r0Spex7dmS4="}],"size":3247,"noattachment":false,"key":"/yeoman-assert/-/yeoman-assert-3.1.0.tgz"},"maintainers":[{"name":"addyosmani","email":"addyosmani@gmail.com"},{"name":"arthurvr","email":"contact@arthurverschaeve.be"},{"name":"eddiemonge","email":"eddie+npm@eddiemonge.com"},{"name":"hemanth","email":"hemanth.hm@gmail.com"},{"name":"mischah","email":"mail@michael-kuehnel.de"},{"name":"sboudrias","email":"admin@simonboudrias.com"},{"name":"sindresorhus","email":"sindresorhus@gmail.com"},{"name":"stefanbuck","email":"web@broud.de"},{"name":"zckrs","email":"mdara@eleven-labs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yeoman-assert-3.1.0.tgz_1506269676142_0.9658846510574222"},"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":1506269676262,"deprecated":"This package is deprecated. See: https://github.com/yeoman/yeoman/issues/1779","_cnpm_publish_time":1506269676262,"dist-tags":{"latest":"3.1.1"}}