{"name":"chai-files","version":"1.2.0","description":"file system assertions for chai","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/Turbo87/chai-files.git"},"keywords":["assertions","testing","chai","chai-plugin","fs","filesystem"],"author":{"name":"Tobias Bieniek","email":"tobias.bieniek@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/Turbo87/chai-files/issues"},"homepage":"https://github.com/Turbo87/chai-files#readme","devDependencies":{"chai":"^3.5.0","mocha":"^2.4.5"},"dependencies":{"assertion-error":"^1.0.1"},"gitHead":"196c802ea664f50014ee0be5283dcd47c9dd3c61","_id":"chai-files@1.2.0","_shasum":"866b56af24d43f2bd813544bcee45c9da2ad7a11","_from":".","_npmVersion":"2.15.0","_nodeVersion":"0.10.44","_npmUser":{"name":"turbo87","email":"tobias.bieniek@gmx.de"},"dist":{"shasum":"866b56af24d43f2bd813544bcee45c9da2ad7a11","tarball":"http://registry-npm.ywwl.com/chai-files/download/chai-files-1.2.0.tgz","integrity":"sha512-6QiKXDgDWGeRFbZROIzKj9v91fv6S7ADN58q3Bg967ZbH60b+w+duyVMdVmRDx+Jx9HscJ2pUjJEo/MwKNsVTA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCSIzC+pdKoIyb/x9vU5q/rpk+oMTGQK9WjVNmdMnqyRQIgEEQSIzo7IikRHGRPIu0b5cLLUMTFgMfn999mHx/HMcA="}],"size":3710,"noattachment":false,"key":"/chai-files/-/chai-files-1.2.0.tgz"},"maintainers":[{"name":"turbo87","email":"tobias.bieniek@gmx.de"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/chai-files-1.2.0.tgz_1460098859681_0.9059526317287236"},"readme":"\nchai-files\n==============================================================================\n\n[![Build Status](https://travis-ci.org/Turbo87/chai-files.svg?branch=master)](https://travis-ci.org/Turbo87/chai-files)\n[![Build status](https://ci.appveyor.com/api/projects/status/github/Turbo87/chai-files?svg=true)](https://ci.appveyor.com/project/Turbo87/chai-files/branch/master)\n[![npm](https://img.shields.io/npm/v/chai-files.svg)](https://www.npmjs.com/package/chai-files)\n\nfile system assertions for chai\n\n\nInstallation\n------------------------------------------------------------------------------\n\n```\nnpm install --save-dev chai-files\n```\n\nUsage\n------------------------------------------------------------------------------\n\nAfter importing `chai` add the following code to use `chai-files` assertions:\n\n```js\nvar chai = require('chai');\nvar chaiFiles = require('chai-files');\n\nchai.use(chaiFiles);\n\nvar expect = chai.expect;\nvar file = chaiFiles.file;\nvar dir = chaiFiles.dir;\n```\n\n\n### .to.exist\n\nCheck if a file or directory exist:\n\n```js\nexpect(file('index.js')).to.exist;\nexpect(file('index.coffee')).to.not.exist;\n\nexpect(dir('foo')).to.exist;\nexpect(dir('missing')).to.not.exist;\n```\n\n\n### .to.equal(...)\n\nCheck if the file content equals a string:\n\n```js\nexpect(file('foo.txt')).to.equal('foo');\nexpect(file('foo.txt')).to.not.equal('bar');\n\nexpect('foo').to.equal(file('foo.txt'));\nexpect('foo').to.not.equal(file('foo.txt'));\n```\n\n\n### .to.equal(file(...))\n\nCheck if the file equals another file:\n\n```js\nexpect(file('foo.txt')).to.equal(file('foo-copy.txt'));\nexpect(file('foo.txt')).to.not.equal(file('bar.txt'));\n```\n\n\n### .to.be.empty\n\nCheck if a file or directory is empty:\n\n```js\nexpect(file('empty.txt')).to.be.empty;\nexpect(file('foo.txt')).to.not.be.empty;\n\nexpect(dir('empty')).to.be.empty;\nexpect(dir('foo')).to.not.be.empty;\n```\n\n\n### .to.contain(...)\n\nCheck if a file contains a string:\n\n```js\nexpect(file('foo.txt')).to.contain('foo');\nexpect(file('foo.txt')).to.not.contain('bar');\n```\n\n\n### .to.match(/.../)\n\nCheck if a file matches a regular expression:\n\n```js\nexpect(file('foo.txt')).to.match(/fo+/);\nexpect(file('foo.txt')).to.not.match(/bar?/);\n```\n\n\nLicense\n------------------------------------------------------------------------------\nchai-files is licensed under the [MIT License](LICENSE).\n","publish_time":1460098862158,"_cnpm_publish_time":1460098862158,"dist-tags":{"latest":"1.4.0"}}