chai 4.1.0 → 4.3.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 +2 -2
- package/LICENSE +1 -1
- package/README.md +6 -6
- package/chai.js +635 -782
- package/index.mjs +13 -0
- package/karma.conf.js +7 -1
- package/karma.sauce.js +1 -1
- package/lib/chai/assertion.js +12 -2
- package/lib/chai/config.js +1 -1
- package/lib/chai/core/assertions.js +267 -162
- package/lib/chai/interface/assert.js +74 -59
- package/lib/chai/interface/expect.js +13 -0
- package/lib/chai/interface/should.js +16 -1
- package/lib/chai/utils/addLengthGuard.js +0 -2
- package/lib/chai/utils/addProperty.js +1 -1
- package/lib/chai/utils/compareByInspect.js +2 -2
- package/lib/chai/utils/getMessage.js +1 -2
- package/lib/chai/utils/getOperator.js +55 -0
- package/lib/chai/utils/getOwnEnumerableProperties.js +1 -1
- package/lib/chai/utils/index.js +6 -0
- package/lib/chai/utils/inspect.js +1 -8
- package/lib/chai/utils/isProxyEnabled.js +1 -1
- package/lib/chai/utils/objDisplay.js +1 -1
- package/lib/chai/utils/overwriteChainableMethod.js +1 -1
- package/lib/chai/utils/overwriteMethod.js +1 -1
- package/lib/chai/utils/overwriteProperty.js +1 -1
- package/lib/chai/utils/proxify.js +54 -32
- package/lib/chai/utils/test.js +1 -1
- package/lib/chai/utils/transferFlags.js +1 -1
- package/lib/chai.js +1 -1
- package/package.json +20 -12
- package/sauce.browsers.js +0 -9
- package/.npmignore +0 -14
package/CONTRIBUTING.md
CHANGED
|
@@ -154,7 +154,7 @@ Simply run `make release-major`, `make release-minor`, or `make-release-patch`
|
|
|
154
154
|
and it will automatically do the following:
|
|
155
155
|
|
|
156
156
|
- Build chai.js
|
|
157
|
-
- Bump the version numbers
|
|
157
|
+
- Bump the version numbers across the project
|
|
158
158
|
- Make a commit within git
|
|
159
159
|
|
|
160
160
|
All you need to do is push the commit up and make a pull request, one of the core contributors will merge it and publish a release.
|
|
@@ -163,7 +163,7 @@ All you need to do is push the commit up and make a pull request, one of the cor
|
|
|
163
163
|
|
|
164
164
|
Anyone who is a core contributor (see the [Core Contributors Heading in the Readme](https://github.com/chaijs/chai#core-contributors)) can publish a release:
|
|
165
165
|
|
|
166
|
-
1. Go to
|
|
166
|
+
1. Go to the [Releases page on Github](https://github.com/chaijs/chai/releases)
|
|
167
167
|
2. Hit "Draft a new release" (if you can't see this, you're not a core contributor!)
|
|
168
168
|
3. Write human-friendly Release Notes based on changelog.
|
|
169
169
|
- The release title is "x.x.x / YYYY-MM-DD" (where x.x.x is the version number)
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2017 Chai.js Assertion Library
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
src="https://img.shields.io/github/tag/chaijs/chai.svg?style=flat-square"
|
|
24
24
|
/>
|
|
25
25
|
</a>
|
|
26
|
-
<a href="https://www.npmjs.com/
|
|
26
|
+
<a href="https://www.npmjs.com/package/chai">
|
|
27
27
|
<img
|
|
28
28
|
alt="node:?"
|
|
29
|
-
src="https://img.shields.io/badge/node-%3E=
|
|
29
|
+
src="https://img.shields.io/badge/node-%3E=8.0-blue.svg?style=flat-square"
|
|
30
30
|
/>
|
|
31
31
|
</a>
|
|
32
32
|
<br/>
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
src="https://img.shields.io/travis/chaijs/chai/master.svg?style=flat-square"
|
|
50
50
|
/>
|
|
51
51
|
</a>
|
|
52
|
-
<a href="https://
|
|
52
|
+
<a href="https://codecov.io/gh/chaijs/chai">
|
|
53
53
|
<img
|
|
54
54
|
alt="coverage:?"
|
|
55
|
-
src="https://img.shields.io/
|
|
55
|
+
src="https://img.shields.io/codecov/c/github/chaijs/chai.svg?style=flat-square"
|
|
56
56
|
/>
|
|
57
57
|
</a>
|
|
58
58
|
<a href="">
|
|
@@ -86,7 +86,7 @@ For more information or to download plugins, view the [documentation](http://cha
|
|
|
86
86
|
|
|
87
87
|
## What is Chai?
|
|
88
88
|
|
|
89
|
-
Chai is an _assertion library_, similar to Node's
|
|
89
|
+
Chai is an _assertion library_, similar to Node's built-in `assert`. It makes testing much easier by giving you lots of assertions you can run against your code.
|
|
90
90
|
|
|
91
91
|
## Installation
|
|
92
92
|
|
|
@@ -94,7 +94,7 @@ Chai is an _assertion library_, similar to Node's build in `assert`. It makes te
|
|
|
94
94
|
|
|
95
95
|
`chai` is available on [npm](http://npmjs.org). To install it, type:
|
|
96
96
|
|
|
97
|
-
$ npm install chai
|
|
97
|
+
$ npm install --save-dev chai
|
|
98
98
|
|
|
99
99
|
### Browsers
|
|
100
100
|
|