{"name":"chai-files","version":"1.4.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":"c440741ce4d319338361d4275589e91aed5fc907","_id":"chai-files@1.4.0","_shasum":"0e25610fadc551b1eae79c2f4ee79faf2f842296","_from":".","_npmVersion":"2.15.1","_nodeVersion":"0.12.15","_npmUser":{"name":"turbo87","email":"tobias.bieniek@gmx.de"},"dist":{"shasum":"0e25610fadc551b1eae79c2f4ee79faf2f842296","tarball":"http://registry-npm.ywwl.com/chai-files/download/chai-files-1.4.0.tgz","integrity":"sha512-tPTx7H2kpR+wILWHRx8RxpXcRUdc2uH8su505C9R3p5GA+eYbZBXuxWC0RZbyElYi7X7Fp/V/S2PQjkakrT1mQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGmE6in/1kcbFb1rC0RQTju6UDXuQ6NGxlQQ9nNdKc+lAiBP6UCBWEnZrQq6V8Aw2wl34FIQ3o+peY3j4q8axQBPaQ=="}],"size":4327,"noattachment":false,"key":"/chai-files/-/chai-files-1.4.0.tgz"},"maintainers":[{"name":"turbo87","email":"tobias.bieniek@gmx.de"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/chai-files-1.4.0.tgz_1468592590811_0.815157120116055"},"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":1468592593402,"_cnpm_publish_time":1468592593402,"dist-tags":{"latest":"1.4.0"}}