chai 4.3.10 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +7 -1
- package/README.md +3 -43
- package/chai.js +3802 -11206
- package/index.js +1 -1
- package/{karma.conf.js → karma.conf.cjs} +4 -3
- package/lib/chai/assertion.js +153 -163
- package/lib/chai/config.js +28 -2
- package/lib/chai/core/assertions.js +3631 -3634
- package/lib/chai/interface/assert.js +3036 -3042
- package/lib/chai/interface/expect.js +40 -37
- package/lib/chai/interface/should.js +203 -204
- package/lib/chai/utils/addChainableMethod.js +8 -8
- package/lib/chai/utils/addLengthGuard.js +3 -3
- package/lib/chai/utils/addMethod.js +8 -8
- package/lib/chai/utils/addProperty.js +7 -7
- package/lib/chai/utils/compareByInspect.js +3 -3
- package/lib/chai/utils/expectTypes.js +5 -5
- package/lib/chai/utils/flag.js +2 -2
- package/lib/chai/utils/getActual.js +2 -2
- package/lib/chai/utils/getMessage.js +5 -5
- package/lib/chai/utils/getOperator.js +5 -6
- package/lib/chai/utils/getOwnEnumerableProperties.js +3 -3
- package/lib/chai/utils/getOwnEnumerablePropertySymbols.js +2 -2
- package/lib/chai/utils/getProperties.js +2 -2
- package/lib/chai/utils/index.js +30 -34
- package/lib/chai/utils/inspect.js +4 -7
- package/lib/chai/utils/isNaN.js +2 -2
- package/lib/chai/utils/isProxyEnabled.js +3 -3
- package/lib/chai/utils/objDisplay.js +4 -4
- package/lib/chai/utils/overwriteChainableMethod.js +6 -6
- package/lib/chai/utils/overwriteMethod.js +8 -8
- package/lib/chai/utils/overwriteProperty.js +7 -7
- package/lib/chai/utils/proxify.js +7 -7
- package/lib/chai/utils/test.js +3 -3
- package/lib/chai/utils/transferFlags.js +2 -2
- package/lib/chai/utils/type-detect.js +16 -0
- package/lib/chai.js +27 -32
- package/package.json +24 -28
- package/register-assert.cjs +3 -0
- package/register-assert.js +3 -1
- package/register-expect.cjs +3 -0
- package/register-expect.js +3 -1
- package/register-should.cjs +3 -0
- package/register-should.js +3 -1
- package/web-test-runner.config.js +17 -0
- package/index.mjs +0 -14
package/CONTRIBUTING.md
CHANGED
|
@@ -21,6 +21,7 @@ Following these guidelines helps to communicate that you respect the time of the
|
|
|
21
21
|
|
|
22
22
|
- Creating an Issue or Pull Request requires a [GitHub](http://github.com) account.
|
|
23
23
|
- Issue reports should be **clear**, **concise** and **reproducible**. Check to see if your issue has already been resolved in the [master]() branch or already reported in Chai's [GitHub Issue Tracker](https://github.com/chaijs/chai/issues).
|
|
24
|
+
- Pull Requests must adhere to strict [coding style guidelines](https://github.com/chaijs/chai/wiki/Chai-Coding-Style-Guide).
|
|
24
25
|
- In general, avoid submitting PRs for new Assertions without asking core contributors first. More than likely it would be better implemented as a plugin.
|
|
25
26
|
- Additional support is available via the [Google Group](http://groups.google.com/group/chaijs) or on irc.freenode.net#chaijs.
|
|
26
27
|
- **IMPORTANT**: By submitting a patch, you agree to allow the project owner to license your work under the same license as that used by the project.
|
|
@@ -90,7 +91,7 @@ Good pull requests - patches, improvements, new features - are a fantastic help.
|
|
|
90
91
|
|
|
91
92
|
**Please ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project.
|
|
92
93
|
|
|
93
|
-
Please adhere to the coding conventions used throughout a project (indentation, accurate comments, etc.) and any other requirements (such as test coverage).
|
|
94
|
+
Please adhere to the coding conventions used throughout a project (indentation, accurate comments, etc.) and any other requirements (such as test coverage). Please review the [Chai.js Coding Style Guide](https://github.com/chaijs/chai/wiki/Chai-Coding-Style-Guide).
|
|
94
95
|
|
|
95
96
|
Follow this process if you'd like your work considered for inclusion in the project:
|
|
96
97
|
|
|
@@ -184,6 +185,11 @@ For most of the documentation you are going to want to visit [ChaiJS.com](http:/
|
|
|
184
185
|
- [API Reference](http://chaijs.com/api/)
|
|
185
186
|
- [Plugins](http://chaijs.com/plugins/)
|
|
186
187
|
|
|
188
|
+
Alternatively, the [wiki](https://github.com/chaijs/chai/wiki) might be what you are looking for.
|
|
189
|
+
|
|
190
|
+
- [Chai Coding Style Guide](https://github.com/chaijs/chai/wiki/Chai-Coding-Style-Guide)
|
|
191
|
+
- [Third-party Resources](https://github.com/chaijs/chai/wiki/Third-Party-Resources)
|
|
192
|
+
|
|
187
193
|
Or finally, you may find a core-contributor or like-minded developer in any of our support channels.
|
|
188
194
|
|
|
189
195
|
- IRC: irc.freenode.org #chaijs
|
package/README.md
CHANGED
|
@@ -11,54 +11,16 @@
|
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
13
|
<p align=center>
|
|
14
|
-
<a href="./LICENSE">
|
|
15
|
-
<img
|
|
16
|
-
alt="license:mit"
|
|
17
|
-
src="https://img.shields.io/badge/license-mit-green.svg?style=flat-square"
|
|
18
|
-
/>
|
|
19
|
-
</a>
|
|
20
|
-
<a href="https://github.com/chaijs/chai/releases">
|
|
21
|
-
<img
|
|
22
|
-
alt="tag:?"
|
|
23
|
-
src="https://img.shields.io/github/tag/chaijs/chai.svg?style=flat-square"
|
|
24
|
-
/>
|
|
25
|
-
</a>
|
|
26
14
|
<a href="https://www.npmjs.com/package/chai">
|
|
27
|
-
<img
|
|
28
|
-
alt="node:?"
|
|
29
|
-
src="https://img.shields.io/badge/node-%3E=4.0-blue.svg?style=flat-square"
|
|
30
|
-
/>
|
|
31
|
-
</a>
|
|
32
|
-
<br/>
|
|
33
|
-
<a href="https://saucelabs.com/u/chaijs">
|
|
34
|
-
<img
|
|
35
|
-
alt="Selenium Test Status"
|
|
36
|
-
src="https://saucelabs.com/browser-matrix/chaijs.svg"
|
|
37
|
-
/>
|
|
38
|
-
</a>
|
|
39
|
-
<br/>
|
|
40
|
-
<a href="https://www.npmjs.com/packages/chai">
|
|
41
15
|
<img
|
|
42
16
|
alt="downloads:?"
|
|
43
17
|
src="https://img.shields.io/npm/dm/chai.svg?style=flat-square"
|
|
44
18
|
/>
|
|
45
19
|
</a>
|
|
46
|
-
<a href="https://
|
|
47
|
-
<img
|
|
48
|
-
alt="build:?"
|
|
49
|
-
src="https://img.shields.io/travis/chaijs/chai/master.svg?style=flat-square"
|
|
50
|
-
/>
|
|
51
|
-
</a>
|
|
52
|
-
<a href="https://codecov.io/gh/chaijs/chai">
|
|
53
|
-
<img
|
|
54
|
-
alt="coverage:?"
|
|
55
|
-
src="https://img.shields.io/codecov/c/github/chaijs/chai.svg?style=flat-square"
|
|
56
|
-
/>
|
|
57
|
-
</a>
|
|
58
|
-
<a href="">
|
|
20
|
+
<a href="https://www.npmjs.com/package/chai">
|
|
59
21
|
<img
|
|
60
|
-
alt="
|
|
61
|
-
src="https://img.shields.io/
|
|
22
|
+
alt="node:?"
|
|
23
|
+
src="https://img.shields.io/badge/node-%3E=4.0-blue.svg?style=flat-square"
|
|
62
24
|
/>
|
|
63
25
|
</a>
|
|
64
26
|
<br/>
|
|
@@ -177,11 +139,9 @@ Chai offers a robust Plugin architecture for extending Chai's assertions and int
|
|
|
177
139
|
- [chaijs / chai-docs](https://github.com/chaijs/chai-docs): The chaijs.com website source code.
|
|
178
140
|
- [chaijs / assertion-error](https://github.com/chaijs/assertion-error): Custom `Error` constructor thrown upon an assertion failing.
|
|
179
141
|
- [chaijs / deep-eql](https://github.com/chaijs/deep-eql): Improved deep equality testing for Node.js and the browser.
|
|
180
|
-
- [chaijs / type-detect](https://github.com/chaijs/type-detect): Improved typeof detection for Node.js and the browser.
|
|
181
142
|
- [chaijs / check-error](https://github.com/chaijs/check-error): Error comparison and information related utility for Node.js and the browser.
|
|
182
143
|
- [chaijs / loupe](https://github.com/chaijs/loupe): Inspect utility for Node.js and browsers.
|
|
183
144
|
- [chaijs / pathval](https://github.com/chaijs/pathval): Object value retrieval given a string path.
|
|
184
|
-
- [chaijs / get-func-name](https://github.com/chaijs/get-func-name): Utility for getting a function's name for node and the browser.
|
|
185
145
|
|
|
186
146
|
### Contributing
|
|
187
147
|
|