Skip to content

Commit 4eec6a0

Browse files
author
ChaiJs Bot
committed
(data): Auto build _data
1 parent 5d023b7 commit 4eec6a0

2 files changed

Lines changed: 118 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"_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 ![Continuous Integration](https://github.com/GaneshSPatil/chai-arrays/workflows/Continuous%20Integration/badge.svg)\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"}
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
layout: plugin
3+
permalink: plugins/@ermeschultz/chai-arrays/
4+
pluginName: @ermeschultz/chai-arrays
5+
---
6+
7+
# chai-arrays ![Continuous Integration](https://github.com/GaneshSPatil/chai-arrays/workflows/Continuous%20Integration/badge.svg)
8+
a simple chai plugin for better array assertions
9+
10+
---
11+
12+
## Installation
13+
```
14+
npm install chai-arrays
15+
```
16+
17+
---
18+
19+
## Usage
20+
21+
### plug-in
22+
23+
```
24+
const chai = require('chai');
25+
const assertArrays = require('chai-arrays');
26+
chai.use(assertArrays);
27+
```
28+
29+
### array
30+
31+
Asserts that the type of `actual` is `Array`.
32+
33+
```
34+
expect([1, 2, 3]).to.be.array();
35+
expect('foobar').not.to.be.array();
36+
37+
expect(new Uint8Array([1])).to.be.Uint8Array();
38+
expect(new Uint16Array([1])).to.be.Uint16Array();
39+
expect(new Uint32Array([1])).to.be.Uint32Array();
40+
expect(new Uint8ClampedArray([1])).to.be.Uint8ClampedArray();
41+
```
42+
43+
### ofSize
44+
45+
Asserts that the size of `actual` is equal to `expected`.
46+
47+
```
48+
expect([1, 2, 3]).to.be.ofSize(3);
49+
expect([1, 2, 3]).not.to.be.ofSize(5);
50+
```
51+
52+
### equalTo
53+
54+
Asserts that the `actual` is equal to `expected`.
55+
56+
```
57+
expect([1, 2, 3]).to.be.equalTo([1, 2, 3]);
58+
expect([1, 2, 3]).not.to.be.equalTo([1, 2, 5]);
59+
```
60+
61+
### containing
62+
63+
Asserts that the `actual` is containing the `expected` element.
64+
65+
```
66+
expect([1, 2, 3]).to.be.containing(1);
67+
expect([1, 2, 3]).not.to.be.containing(5);
68+
```
69+
70+
### containingAllOf
71+
72+
Asserts that the `actual` is containing all of the `expected` elements.
73+
74+
```
75+
expect([1, 2, 3]).to.be.containingAllOf([1]);
76+
expect([1, 2, 3]).to.be.containingAllOf([1, 3]);
77+
expect([1, 2, 3]).to.be.containingAllOf([1, 2, 3]);
78+
```
79+
80+
### containingAnyOf
81+
82+
Asserts that the `actual` is containing any of the `expected` elements.
83+
84+
```
85+
expect([1, 2, 3]).to.be.containingAnyOf([1]);
86+
expect([1, 2, 3]).to.be.containingAnyOf([6, 7, 3, 5]);
87+
expect([1, 2, 3]).to.be.containingAnyOf([1, 2, 3]);
88+
```
89+
90+
### sorted
91+
92+
Asserts that the `actual` array is sorted.
93+
94+
```
95+
expect([1, 2, 3]).to.be.sorted();
96+
expect([1, 2, 4, 3]).not.to.be.sorted();
97+
98+
expect([3, 2, 1]).to.be.sorted((prev, next) => prev < next); // sorting based on the provided function
99+
```
100+
101+
## License
102+
103+
```plain
104+
Copyright 2020 @ GaneshSPatil
105+
106+
Licensed under the Apache License, Version 2.0 (the "License");
107+
you may not use this file except in compliance with the License.
108+
You may obtain a copy of the License at
109+
110+
http://www.apache.org/licenses/LICENSE-2.0
111+
112+
Unless required by applicable law or agreed to in writing, software
113+
distributed under the License is distributed on an "AS IS" BASIS,
114+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
115+
See the License for the specific language governing permissions and
116+
limitations under the License.
117+
```

0 commit comments

Comments
 (0)