{"_id":"chai-properties","_rev":"27-0013681b6798ffee0567588e28b64472","name":"chai-properties","description":"check partially object properties with chai","dist-tags":{"latest":"1.4.0"},"versions":{"1.1.1":{"name":"chai-properties","version":"1.1.1","keywords":["chai","testing","properties"],"description":"check partially object properties with chai","main":"chai-properties.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"git://github.com/vbardales/chai-properties.git"},"author":{"name":"vbardales"},"license":"MIT","devDependencies":{"chai":"~1","mocha":"~1","nodemon":"~0","lodash":"~2.4.1"},"peerDependencies":{"chai":"~1","lodash":"~2.4.1"},"engines":{"npm":">= 1.2"},"bugs":{"url":"https://github.com/vbardales/chai-properties/issues"},"_id":"chai-properties@1.1.1","dist":{"shasum":"d8e77a54d2240759c3fb5044faf94282342f5a59","tarball":"https://registry.npmjs.org/chai-properties/-/chai-properties-1.1.1.tgz","integrity":"sha512-iov82kQl9IGZ4DfBCBZDvN6/o4oJ4reZrgNVRr4qEo3vR18M/41uTUAGEnnjQ07WrvFBeyNBSHzF/QZZjj7wKA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrznVcH9YFjm/hZIJqx1VBB1N5JzYhS8IoZ96ToVLECQIhAKZSc9p6RGOTEd75z1c5uvn+JOL1LUhNfCqfJK/7ypoc"}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"vbardales","email":"virginie.bardales@gmail.com"},"maintainers":[{"name":"vbardales","email":"virginie.bardales@gmail.com"}],"directories":{}},"1.0.0":{"name":"chai-properties","version":"1.0.0","keywords":["chai","testing","properties"],"description":"check partially object properties with chai","main":"chai-properties.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"git://github.com/vbardales/chai-properties.git"},"author":{"name":"vbardales"},"license":"MIT","devDependencies":{"chai":"~1","mocha":"~1","nodemon":"~0","lodash":"~2.4.1"},"peerDependencies":{"chai":"~1","lodash":"~2.4.1"},"engines":{"npm":">= 1.2"},"bugs":{"url":"https://github.com/vbardales/chai-properties/issues"},"_id":"chai-properties@1.0.0","dist":{"shasum":"ad443b813b05d95ee3d7b7aeaceb32c9a1d5ab5d","tarball":"https://registry.npmjs.org/chai-properties/-/chai-properties-1.0.0.tgz","noattachment":true},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"vbardales","email":"virginie.bardales@gmail.com"},"maintainers":[{"name":"vbardales","email":"virginie.bardales@gmail.com"}],"directories":{}},"1.0.1":{"name":"chai-properties","version":"1.0.1","keywords":["chai","testing","properties"],"description":"check partially object properties with chai","main":"chai-properties.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"git://github.com/vbardales/chai-properties.git"},"author":{"name":"vbardales"},"license":"MIT","devDependencies":{"chai":"~1","mocha":"~1","nodemon":"~0","lodash":"~2.4.1"},"peerDependencies":{"chai":"~1","lodash":"~2.4.1"},"engines":{"npm":">= 1.2"},"bugs":{"url":"https://github.com/vbardales/chai-properties/issues"},"_id":"chai-properties@1.0.1","dist":{"shasum":"8f35da6f8e32e181a8de9bac8fe084eb9bdc6803","tarball":"https://registry.npmjs.org/chai-properties/-/chai-properties-1.0.1.tgz","integrity":"sha512-2e5IuwhLmlRKnpfNlZ3vbUzEKU/iYXloPH/DLPVmbYSwwmfJrtnXTOgka6x1pGpcyS9yeD/lnzVdODxR5ikkEg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHllRo+uxYKsSiazKs0YZVJFB/C9lu/jJVog7iAt8cELAiARLBBUVtFibCzs9sCusmixbHln1rhyLVqF5ILIekfNQw=="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"vbardales","email":"virginie.bardales@gmail.com"},"maintainers":[{"name":"vbardales","email":"virginie.bardales@gmail.com"}],"directories":{}},"1.1.0":{"name":"chai-properties","version":"1.1.0","keywords":["chai","testing","properties"],"description":"check partially object properties with chai","main":"chai-properties.js","scripts":{"test":"make test"},"repository":{"type":"git","url":"git://github.com/vbardales/chai-properties.git"},"author":{"name":"vbardales"},"license":"MIT","devDependencies":{"chai":"~1","mocha":"~1","nodemon":"~0","lodash":"~2.4.1"},"peerDependencies":{"chai":"~1","lodash":"~2.4.1"},"engines":{"npm":">= 1.2"},"bugs":{"url":"https://github.com/vbardales/chai-properties/issues"},"_id":"chai-properties@1.1.0","dist":{"shasum":"fae275cc405e38e3f246dfe6420e2d64c839d2a4","tarball":"https://registry.npmjs.org/chai-properties/-/chai-properties-1.1.0.tgz","integrity":"sha512-mCJ8RMKgDDGn7uYuQef8wpH59kEf/0cbUkHqPOoGi0/jKzRkREjKJWY0+8B+FjL9Svpar5KASdy5fIxer08zTA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCLyQGXavedwMGbCz/8gI0VvE5tsz4FfRgEM1lZ1FXERwIhALqNkJzL4k74HXFH0185dDCBhTMtxxohdw9Xmp6sOovJ"}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"vbardales","email":"virginie.bardales@gmail.com"},"maintainers":[{"name":"vbardales","email":"virginie.bardales@gmail.com"}],"directories":{}},"1.2.0":{"name":"chai-properties","version":"1.2.0","keywords":["chai","testing","properties"],"description":"check partially object properties with chai","main":"chai-properties.js","scripts":{"test":"mocha --recursive -C test/","watchtest":"mocha --watch --recursive -C test/"},"repository":{"type":"git","url":"git://github.com/vbardales/chai-properties.git"},"author":{"name":"vbardales"},"license":"MIT","devDependencies":{"chai":">=1 <3","mocha":"^2.1.0"},"peerDependencies":{"chai":">=1 <3"},"engines":{"npm":">= 1.2"},"dependencies":{"lodash":"^3.1.0"},"gitHead":"4442db4d73a3c16cc3db4b8d7992bb87a4f697a6","bugs":{"url":"https://github.com/vbardales/chai-properties/issues"},"homepage":"https://github.com/vbardales/chai-properties","_id":"chai-properties@1.2.0","_shasum":"fb6c8d9bb79a94ff15a646d68b21eb820a804976","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"vbardales","email":"virginie.bardales@gmail.com"},"maintainers":[{"name":"vbardales","email":"virginie.bardales@gmail.com"}],"dist":{"shasum":"fb6c8d9bb79a94ff15a646d68b21eb820a804976","tarball":"https://registry.npmjs.org/chai-properties/-/chai-properties-1.2.0.tgz","integrity":"sha512-0QWo+Tdf000C5+C9wBHFU6sFGsDEN/9mavSwIvF5UweHBzZ5oUJnOtTOXewQiz2Tk0Y8BMpywKCl221BdT+A7Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbegSx9tKsfKZzZMhWIELJXHwhETR9AbzCkf0tHxWtXwIhAJ+TS7r7Kz7Fcnsc6dU++i9N9efd9hzQ4UDXNFvW8wbE"}]},"directories":{}},"1.2.1":{"name":"chai-properties","version":"1.2.1","keywords":["chai","testing","properties"],"description":"check partially object properties with chai","main":"chai-properties.js","scripts":{"test":"mocha --recursive -C test/","watchtest":"mocha --watch --recursive -C test/"},"repository":{"type":"git","url":"git://github.com/vbardales/chai-properties.git"},"author":{"name":"vbardales"},"license":"MIT","devDependencies":{"chai":">=1 <4","mocha":"^2.1.0"},"peerDependencies":{"chai":">=1 <4"},"engines":{"npm":">= 1.2"},"dependencies":{"lodash":"^3.1.0"},"gitHead":"89054846ed5d3da99938aede79308af7d89f6848","bugs":{"url":"https://github.com/vbardales/chai-properties/issues"},"homepage":"https://github.com/vbardales/chai-properties","_id":"chai-properties@1.2.1","_shasum":"44330f3149519307c783efd1ce4d909f38994461","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"vbardales","email":"virginie.bardales@gmail.com"},"maintainers":[{"name":"vbardales","email":"virginie.bardales@gmail.com"}],"dist":{"shasum":"44330f3149519307c783efd1ce4d909f38994461","tarball":"https://registry.npmjs.org/chai-properties/-/chai-properties-1.2.1.tgz","integrity":"sha512-7Aic/tbhY8TAEuRdINtsxJk/eisc+JvVBp36SCTYnBU+HpFoVA2gAYk1r29aHVDi6H4dlENel0d4rOKRlgfteg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDgalpVId0leoMFzRyrrIniKUv+uQ4oKEOtvFzUt5padAiEA4UdSgmUB0A28mQ8ZA41TLNgYY2WszkJW2ZekdRsnaL4="}]},"directories":{}},"1.2.3":{"name":"chai-properties","version":"1.2.3","keywords":["chai","testing","properties"],"description":"check partially object properties with chai","main":"chai-properties.js","scripts":{"test":"mocha --recursive -C test/","watchtest":"mocha --watch --recursive -C test/"},"repository":{"type":"git","url":"git://github.com/vbardales/chai-properties.git"},"author":{"name":"vbardales"},"license":"MIT","devDependencies":{"chai":">=1 <4","mocha":"~2.1.0"},"peerDependencies":{"chai":">=1 <4"},"engines":{"npm":">= 1.2"},"dependencies":{"lodash":"~3.1.0"},"gitHead":"5ce933365b10e931ac2358e3c0fe9fc0b534d013","bugs":{"url":"https://github.com/vbardales/chai-properties/issues"},"homepage":"https://github.com/vbardales/chai-properties#readme","_id":"chai-properties@1.2.3","_shasum":"7fa40de2d07e532fe1903da9c717ad3154ee6f18","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"vbardales","email":"virginie.bardales@gmail.com"},"maintainers":[{"name":"vbardales","email":"virginie.bardales@gmail.com"}],"dist":{"shasum":"7fa40de2d07e532fe1903da9c717ad3154ee6f18","tarball":"https://registry.npmjs.org/chai-properties/-/chai-properties-1.2.3.tgz","integrity":"sha512-dBodr5y00Tt0Bph+Yl2n5CbexElnmg8iE5p78ERDYRwCENI8QE7o/vTpniDkwU5HkjWO9UxPmaxNCSohZJYjjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC4+0aGLYGG7qWbi9x5Kv9QnDxbOq3Cu8mGzk8OAELIfAiAckoKC2mzClKxLUmcM1zNp1RxcG99Qw4HY5jFBtOZtCQ=="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chai-properties-1.2.3.tgz_1511267555440_0.9597962235566229"},"directories":{}},"1.3.0":{"name":"chai-properties","version":"1.3.0","keywords":["chai","testing","properties"],"description":"check partially object properties with chai","main":"chai-properties.js","scripts":{"test":"mocha --recursive -C test/","watchtest":"mocha --watch --recursive -C test/"},"repository":{"type":"git","url":"git://github.com/vbardales/chai-properties.git"},"author":{"name":"vbardales"},"license":"MIT","devDependencies":{"chai":"^4.1.2","mocha":"~2.1.0"},"peerDependencies":{"chai":"^4.1.2"},"engines":{"npm":">= 1.2"},"dependencies":{"lodash":"~3.1.0"},"gitHead":"b06163cf1a970455e981b14680e94505333a895f","bugs":{"url":"https://github.com/vbardales/chai-properties/issues"},"homepage":"https://github.com/vbardales/chai-properties#readme","_id":"chai-properties@1.3.0","_shasum":"c1f9e771c7aa2b27f9dbd064bc8432b74f0e3af5","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"vbardales","email":"virginie.bardales@gmail.com"},"maintainers":[{"name":"vbardales","email":"virginie.bardales@gmail.com"}],"dist":{"shasum":"c1f9e771c7aa2b27f9dbd064bc8432b74f0e3af5","tarball":"https://registry.npmjs.org/chai-properties/-/chai-properties-1.3.0.tgz","integrity":"sha512-X6lyEBnGmHW/QQG4IqhtnnMcaewj8JWHCf05CBRwnIZsKkGLBO3Via9KOR0RFRqJ2terfP+2FEMEg7l7rdvJew==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjIhYN8TNq1a7twjG8NgrLnjvM+VGs9hkA9lwgyHr4xQIhANqE2ZtKQpnIbB/0rNAEFG8uRVYfGwszMY6agwu3hUQB"}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chai-properties-1.3.0.tgz_1511269564522_0.9049363541416824"},"directories":{}},"1.4.0":{"name":"chai-properties","version":"1.4.0","keywords":["chai","testing","properties"],"description":"check partially object properties with chai","main":"chai-properties.js","scripts":{"test":"mocha --recursive -C test/","watchtest":"mocha --watch --recursive -C test/"},"repository":{"type":"git","url":"git://github.com/vbardales/chai-properties.git"},"author":{"name":"vbardales"},"license":"MIT","devDependencies":{"chai":"^4.1.2","mocha":"~2.1.0"},"peerDependencies":{"chai":"^4.1.2"},"engines":{"npm":">= 1.2"},"dependencies":{"lodash":"^4.17.15"},"gitHead":"5cca225ca20a100ecdda922303f5d9948590c946","bugs":{"url":"https://github.com/vbardales/chai-properties/issues"},"homepage":"https://github.com/vbardales/chai-properties#readme","_id":"chai-properties@1.4.0","_nodeVersion":"12.13.1","_npmVersion":"6.12.1","dist":{"integrity":"sha512-YcWARvW+X65f0oHdNRsds72l3x/h2w0MUpp+lBnP0/ggXV1tpR/kU5Am0XGp50+6PrxPExdIxu/Wo4B17Vcn3Q==","shasum":"30719f84a081dbdb4867bef40f19ecc020a5100c","tarball":"https://registry.npmjs.org/chai-properties/-/chai-properties-1.4.0.tgz","fileCount":6,"unpackedSize":15213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd59WoCRA9TVsSAnZWagAADEsP/jnsRRjpItmaeY4DitZX\n8yvBNANceccU/vVCReHrigiJRmocGuTXcxerFeyM0jHF5bHSIEvN7Pnw93Hg\njOtjnLKPgBa0ByRuo8g6z6LuH+ZFRnACjTpYUjIHMn50Bc2Gcc575dMd6vRF\n2qyfyWG4wlfQildWht94GQ1efKCdkIjma+awEuDYJ4Gn5fYXqewH+PP838mL\nXKnHrBpatpcp7oGddx8pf3KbKq9MNkookVzx5y1o382kBFF31ixjv55Qn57M\nKnzafVXVYDhNfQKS2ttL/VD01Vr1tqsnvB7Odmu3SpVAGVPwUMzFS6qBnW/V\nGvRozKfpEUwLvAipAVzx4xkxJBeB0x12+Dvi8SbGRQFvInKMDBYOr3f3Elnn\ndBREDQ5LhU+WLz4/Nof68kSQHDoRIgWQx6qggqv4IJgPfOxJfe2kXRG0IT98\nJQ/okohg9VBUGOkzUKbGT23k6MRZIB6h0im04gGzMgP+VHbe3LPQ/HTDynAP\nCmpGg3rmwMMP8gPCJK6eMl3JoXKSVicfO1dR9Wpg36FcbqP7ZowziJLCsqPH\nG832TIgPGLDnJ6odcusM2pwvpD3H9mtY06dqFRkYxgHiglDeJoHlfX3Ntrer\n0wHLskSDF+S2naXOtw/sp2S2oiAq4ptBucReZPwWssZ7FmG3Ji2LtKLc5l3u\nbWT6\r\n=hNFh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEvFzN4MVdLc9Vu88f+trosOV5JAJ9PbEytrQJeuFMdPAiEA+ESs0Fvhp0dgEXHnWHUp4nYx/B/Jlu/JSi9slzaupuo="}]},"maintainers":[{"name":"vbardales","email":"virginie.bardales@gmail.com"}],"_npmUser":{"name":"vbardales","email":"virginie.bardales@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chai-properties_1.4.0_1575474599880_0.8616719867977869"},"_hasShrinkwrap":false}},"readme":"[![Build Status](https://travis-ci.org/CurtisHumphrey/chai-properties.svg?branch=master)](https://travis-ci.org/CurtisHumphrey/chai-properties)\r\n# chai-properties\r\n\r\n### Intallation:\r\n```bash\r\nnpm install --save chai-properties\r\n```\r\n\r\nProperties matcher for chai\r\n\r\nMake assertions that values have all the same attributes and values without asserting strict object equality.\r\n\r\n### browser-side\r\n\r\ninclude chai properties after chai:\r\n\r\n```html\r\n<script src=\"lodash.js\"></script>\r\n<script src=\"chai.js\"></script>\r\n<script src=\"chai-properties.js\"></script>\r\n```\r\n\r\n### server-side\r\n\r\nhave chai use chai-properties:\r\n\r\n```js\r\nvar chai = require('chai');\r\nchai.use(require('chai-properties'));\r\n```\r\n\r\n## Assertions\r\n\r\n\r\n### properties(object)\r\n\r\npartially compare object attributes and values\r\n\r\n```js\r\nvar subject = { a: 'a', b: 'b', c: 'c' };\r\nsubject.should.have.properties({ a: 'a' });\r\nsubject.should.have.properties({ a: 'a', b: 'b' });\r\nsubject.should.not.have.properties({ a: 'a', z: 'z' });\r\nsubject.should.not.have.properties({ a: '1' });\r\n\r\nexpect(subject).to.have.properties({ a: 'a' });\r\nexpect(subject).to.have.properties({ a: 'a', b: 'b' });\r\nexpect(subject).to.not.have.properties({ a: 'a', z: 'z' });\r\nexpect(subject).to.not.have.properties({ a: '1' });\r\n\r\nassert.haveProperties(subject, { a: 'a' });\r\nassert.haveProperties(subject, { a: 'a', b: 'b' });\r\nassert.notHaveProperties(subject, { a: 'a', z: 'z' });\r\nassert.notHaveProperties(subject, { a: '1' });\r\n```\r\n\r\n## Difference between expectation and actual result\r\n\r\n`properties` assertion will show difference between expectation and actual result when asserion will fail.\r\n\r\n```js\r\nvar subject = { a: 'a', b: 'b', c: 'c' };\r\nexpect(subject).to.have.properties({ a: 'a', b: 'c' });\r\n```\r\n\r\n```\r\nAssertionError: expected { a: 'a', b: 'b', c: 'c' }\r\n  to have properties { a: 'a', b: 'c' }, but found { a: 'a', b: 'b' }\r\n\r\n+ expected - actual\r\n\r\n {\r\n   \"a\": \"a\"\r\n-  \"b\": \"b\"\r\n-  \"c\": \"c\"\r\n+  \"b\": \"c\"\r\n }\r\n```\r\n","maintainers":[{"name":"vbardales","email":"virginie.bardales@gmail.com"}],"time":{"modified":"2022-06-30T11:20:03.301Z","created":"2013-12-19T10:22:49.714Z","1.0.0":"2013-12-19T12:01:15.630Z","1.1.1":"2013-12-19T11:54:35.326Z","1.0.1":"2013-12-19T12:28:00.006Z","1.0.2":"2013-12-19T15:19:14.923Z","1.1.0":"2013-12-23T10:43:30.976Z","1.2.0":"2015-02-15T21:15:58.076Z","1.2.1":"2015-06-15T17:45:54.064Z","1.2.3":"2017-11-21T12:32:35.495Z","1.3.0":"2017-11-21T13:06:05.533Z","1.4.0":"2019-12-04T15:50:00.002Z"},"author":{"name":"vbardales"},"repository":{"type":"git","url":"git://github.com/vbardales/chai-properties.git"},"homepage":"https://github.com/vbardales/chai-properties#readme","keywords":["chai","testing","properties"],"bugs":{"url":"https://github.com/vbardales/chai-properties/issues"},"license":"MIT","readmeFilename":"README.md"}