+{"_id":"@ermeschultz/chai-arrays","name":"@ermeschultz/chai-arrays","dist-tags":{"latest":"2.3.0"},"versions":{"2.3.0":{"name":"@ermeschultz/chai-arrays","version":"2.3.0","description":"a simple chai plugin for better array assertions","main":"assertArrays.js","scripts":{"test":"eslint assertArrays.js test && ./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -- --recursive"},"repository":{"type":"git","url":"git+https://github.com/ermelindoschultz/chai-arrays.git"},"keywords":["chai","chai-plugin","testing","assert","expect","Array"],"author":{"name":"Ganesh Patil"},"contributors":[{"name":"Erme Schultz"}],"license":"ISC","bugs":{"url":"https://github.com/ermelindoschultz/chai-arrays/issues"},"homepage":"https://github.com/ermelindoschultz/chai-arrays","engines":{"node":">=0.10"},"devDependencies":{"chai":"^4.2.0","eslint":"^7.2.0","istanbul":"^0.4.5","mocha":"^8.1.3"},"dependencies":{"lodash.isequal":"^4.5.0"},"gitHead":"03d30fbb7dcbd44d687b89e5b7eac392bfa31232","_id":"@ermeschultz/chai-arrays@2.3.0","_nodeVersion":"8.10.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-qwz06zVD7QIhgqEazqHbxN8QKexzvgL4saIGmrM4NrF5GngbdUw3pZIUjBwcPSGeYxG3l3ST/Jvay5KmV98Tqw==","shasum":"cacd718cd70463d165244d8ab90fbeb279caa8ee","tarball":"https://registry.npmjs.org/@ermeschultz/chai-arrays/-/chai-arrays-2.3.0.tgz","fileCount":11,"unpackedSize":51190,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkEg8CRA9TVsSAnZWagAAOnYP/RhWHyCdYMgjBeChDehX\nozVvWmEOlQKJx4fyTrUy2sr8P/7qJo7X7Nw6bEpnhKAht06G9/ulvP6HqG3k\nP60dGNBCeQtmDwLJZc6kZow2LFoYx8QA5TFDPjajklWCcd7hbiLk+3s3ALNy\njs4QunhW/Zx8xYxnSvyhMAqWMSk/uY+0+NcCIhluHi4RS0NcJwFW+wqNJ8ft\nXaOvtuLaEacx7WCKdEmvSNG1Tdthnr384JnY2DnNXF/1WkChOheeN1d6+orE\nnVRLaB1UNkxSwR+Dbgm+wLjlpvzgkK54SUwVNnklYG3JcO/g+q4U0lbOmW4n\nBmzzUCKDnibkvrno7uYWRmrkb/YKoPJ/iGgDaWt0ZeNFN6Qxe7RTb3vWmfJP\nkhyzTmc+N9JhK/9anRadCTNPRrykJlLPWdDdWwFx5Xg/iNK7nQKK+HmfKtwg\nQcWyG9h6xUHJPS4p3LglINdQHFXeeKghj9uB0jLCLsJfdmTTtVkSdpfyyMhx\n+GkteAYkJ+3jzTXjq6thM0Sk7B7ylbUPyhEyYULI8PBPkP+GMoFrZ3t75dqa\n1f3K+hFn2mMm/XC5M1KUV+F3nSwYUHriiArg+ymll+OgJkgFlygUFbCZEy05\nD9wFSdfGIFPixXEqwd1XiHvgI3nMZ8URD5HjkG51V/gGooGmuUrr0PwTTCQR\nU4Ys\r\n=xI5S\r\n-----END PGP SIGNATURE-----\r\n"},"maintainers":[{"name":"ermeschultz","email":"ermelindo.schultz@gmail.com"}],"_npmUser":{"name":"ermeschultz","email":"ermelindo.schultz@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chai-arrays_2.3.0_1603291196121_0.6278028371666864"},"_hasShrinkwrap":false}},"time":{"created":"2020-10-21T14:39:56.083Z","2.3.0":"2020-10-21T14:39:56.274Z","modified":"2020-10-21T14:40:00.211Z"},"maintainers":[{"name":"ermeschultz","email":"ermelindo.schultz@gmail.com"}],"description":"a simple chai plugin for better array assertions","homepage":"https://github.com/ermelindoschultz/chai-arrays","keywords":["chai","chai-plugin","testing","assert","expect","Array"],"repository":{"type":"git","url":"git+https://github.com/ermelindoschultz/chai-arrays.git"},"contributors":[{"name":"Erme Schultz"}],"author":{"name":"Ganesh Patil"},"bugs":{"url":"https://github.com/ermelindoschultz/chai-arrays/issues"},"license":"ISC","readme":"# chai-arrays \na simple chai plugin for better array assertions\n\n---\n\n## Installation\n```\nnpm install chai-arrays\n```\n\n---\n\n## Usage\n\n### plug-in\n\n```\nconst chai = require('chai');\nconst assertArrays = require('chai-arrays');\nchai.use(assertArrays);\n```\n\n### array\n\nAsserts that the type of `actual` is `Array`.\n\n```\nexpect([1, 2, 3]).to.be.array();\nexpect('foobar').not.to.be.array();\n\nexpect(new Uint8Array([1])).to.be.Uint8Array();\nexpect(new Uint16Array([1])).to.be.Uint16Array();\nexpect(new Uint32Array([1])).to.be.Uint32Array();\nexpect(new Uint8ClampedArray([1])).to.be.Uint8ClampedArray();\n```\n\n### ofSize\n\nAsserts that the size of `actual` is equal to `expected`.\n\n```\nexpect([1, 2, 3]).to.be.ofSize(3);\nexpect([1, 2, 3]).not.to.be.ofSize(5);\n```\n\n### equalTo\n\nAsserts that the `actual` is equal to `expected`.\n\n```\nexpect([1, 2, 3]).to.be.equalTo([1, 2, 3]);\nexpect([1, 2, 3]).not.to.be.equalTo([1, 2, 5]);\n```\n\n### containing\n\nAsserts that the `actual` is containing the `expected` element.\n\n```\nexpect([1, 2, 3]).to.be.containing(1);\nexpect([1, 2, 3]).not.to.be.containing(5);\n```\n\n### containingAllOf\n\nAsserts that the `actual` is containing all of the `expected` elements.\n\n```\nexpect([1, 2, 3]).to.be.containingAllOf([1]);\nexpect([1, 2, 3]).to.be.containingAllOf([1, 3]);\nexpect([1, 2, 3]).to.be.containingAllOf([1, 2, 3]);\n```\n\n### containingAnyOf\n\nAsserts that the `actual` is containing any of the `expected` elements.\n\n```\nexpect([1, 2, 3]).to.be.containingAnyOf([1]);\nexpect([1, 2, 3]).to.be.containingAnyOf([6, 7, 3, 5]);\nexpect([1, 2, 3]).to.be.containingAnyOf([1, 2, 3]);\n```\n\n### sorted\n\nAsserts that the `actual` array is sorted.\n\n```\nexpect([1, 2, 3]).to.be.sorted();\nexpect([1, 2, 4, 3]).not.to.be.sorted();\n\nexpect([3, 2, 1]).to.be.sorted((prev, next) => prev < next); // sorting based on the provided function\n```\n\n## License\n\n```plain\nCopyright 2020 @ GaneshSPatil\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","readmeFilename":"README.md"}
0 commit comments