chai 2.2.0 → 3.2.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 +21 -17
- package/History.md +21 -0
- package/README.md +35 -81
- package/ReleaseNotes.md +38 -0
- package/bower.json +0 -1
- package/chai.js +3929 -3688
- package/karma.conf.js +1 -1
- package/lib/chai/assertion.js +2 -2
- package/lib/chai/core/assertions.js +210 -33
- package/lib/chai/interface/assert.js +198 -23
- package/lib/chai/utils/getPathInfo.js +1 -1
- package/lib/chai/utils/getProperties.js +2 -2
- package/lib/chai/utils/hasProperty.js +1 -1
- package/lib/chai/utils/index.js +1 -1
- package/lib/chai.js +1 -1
- package/package.json +13 -10
- package/lib/chai/utils/type.js +0 -45
package/CONTRIBUTING.md
CHANGED
|
@@ -140,26 +140,30 @@ git push origin <topic-branch-name>
|
|
|
140
140
|
<a name="releasing"></a>
|
|
141
141
|
## Releasing
|
|
142
142
|
|
|
143
|
-
Releases can be prepared by
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
143
|
+
Releases can be **prepared** by anyone with access to the code.
|
|
144
|
+
|
|
145
|
+
Simply run `make release-major`, `make release-minor`, or `make-release-patch`
|
|
146
|
+
and it will automatically do the following:
|
|
147
|
+
|
|
148
|
+
- Build chai.js
|
|
149
|
+
- Bump the version numbers accross the project
|
|
150
|
+
- Make a commit within git
|
|
151
|
+
|
|
152
|
+
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.
|
|
153
|
+
|
|
154
|
+
### Publishing a Release
|
|
155
|
+
|
|
156
|
+
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:
|
|
157
|
+
|
|
158
|
+
1. Go to te [Releases page on Github](https://github.com/chaijs/chai/releases)
|
|
159
|
+
2. Hit "Draft a new release" (if you can't see this, you're not a core contributor!)
|
|
160
|
+
3. Write human-friendly Release Notes based on changelog.
|
|
161
|
+
- The release title is "x.x.x / YYYY-MM-DD" (where x.x.x is the version number)
|
|
157
162
|
- If breaking changes, write migration tutorial(s) and reasoning.
|
|
158
163
|
- Callouts for community contributions (PRs) with links to PR and contributing user.
|
|
159
164
|
- Callouts for other fixes made by core contributors with links to issue.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
- All tagged releases are published to NPM.
|
|
165
|
+
4. Hit "Save Draft" and get other core contributors to check your work, or alternatively hit "Publish release"
|
|
166
|
+
5. That's it!
|
|
163
167
|
|
|
164
168
|
<a name="support"></a>
|
|
165
169
|
## Support
|
package/History.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
### Note
|
|
2
|
+
|
|
3
|
+
As of 3.0.0, the History.md file has been deprecated. [Please refer to the full
|
|
4
|
+
commit logs available on GitHub](https://github.com/chaijs/chai/commits/master).
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
2.3.0 / 2015-04-26
|
|
9
|
+
==================
|
|
10
|
+
|
|
11
|
+
* Merge pull request #423 from ehntoo/patch-1
|
|
12
|
+
* Merge pull request #422 from ljharb/fix_descriptor_tests
|
|
13
|
+
* Fix a small bug in the .null assertion docs
|
|
14
|
+
* Use a regex to account for property ordering issues across engines.
|
|
15
|
+
* Add `make test-firefox`
|
|
16
|
+
* Merge pull request #417 from astorije/astorije/minimalist-typo
|
|
17
|
+
* Remove trailing whitespaces
|
|
18
|
+
* Fix super minor typo in an example
|
|
19
|
+
* Merge pull request #408 from ljharb/enumerableProperty
|
|
20
|
+
* Add `ownPropertyDescriptor` assertion.
|
|
21
|
+
|
|
1
22
|
2.2.0 / 2015-03-26
|
|
2
23
|
==================
|
|
3
24
|
|
package/README.md
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
[](http://chaijs.com)
|
|
2
2
|
|
|
3
|
+
[](#license)<br>
|
|
4
|
+
[](https://github.com/chaijs/chai/releases)
|
|
5
|
+
[](https://travis-ci.org/chaijs/chai)
|
|
6
|
+
[](https://coveralls.io/r/chaijs/chai)<br>
|
|
7
|
+
[](https://www.npmjs.com/packages/chai)
|
|
8
|
+
[](https://www.npmjs.com/packages/chai)
|
|
9
|
+
[](https://david-dm.org/chaijs/chai)
|
|
10
|
+
|
|
11
|
+
[](https://saucelabs.com/u/chaijs)
|
|
12
|
+
|
|
13
|
+
|
|
3
14
|
Chai is a BDD / TDD assertion library for [node](http://nodejs.org) and the browser that
|
|
4
15
|
can be delightfully paired with any javascript testing framework.
|
|
5
16
|
|
|
6
17
|
For more information or to download plugins, view the [documentation](http://chaijs.com).
|
|
7
18
|
|
|
8
|
-
[](https://travis-ci.org/chaijs/chai)
|
|
9
|
-
|
|
10
|
-
[](https://saucelabs.com/u/chaijs)
|
|
11
|
-
|
|
12
19
|
### Plugins
|
|
13
20
|
|
|
14
21
|
Chai offers a robust Plugin architecture for extending Chai's assertions and interfaces.
|
|
@@ -21,86 +28,33 @@ Chai offers a robust Plugin architecture for extending Chai's assertions and int
|
|
|
21
28
|
|
|
22
29
|
- [chaijs / assertion-error](https://github.com/chaijs/assertion-error): Custom `Error` constructor thrown upon an assertion failing.
|
|
23
30
|
- [chaijs / deep-eql](https://github.com/chaijs/deep-eql): Improved deep equality testing for Node.js and the browser.
|
|
31
|
+
- [chaijs / type-detect](https://github.com/chaijs/type-detect): Improved typeof detection for node.js and the browser.
|
|
32
|
+
|
|
33
|
+
### Contributing
|
|
34
|
+
|
|
35
|
+
Thank you very much for considering to contribute!
|
|
36
|
+
|
|
37
|
+
Here are a few issues other contributors frequently ran into when opening pull requests:
|
|
38
|
+
|
|
39
|
+
- Please do not commit changes to the `chai.js` build. We do it once per release.
|
|
40
|
+
- Before pushing your commits, please make sure you [rebase](https://github.com/chaijs/chai/blob/master/CONTRIBUTING.md#pull-requests) them.
|
|
41
|
+
|
|
42
|
+
We also strongly encourage you to read our detailed [contribution guidelines](https://github.com/chaijs/chai/blob/master/CONTRIBUTING.md).
|
|
24
43
|
|
|
25
44
|
### Contributors
|
|
26
45
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
6 Ruben Verborgh 0.7%
|
|
40
|
-
6 Ian Zamojc 0.7%
|
|
41
|
-
5 leider 0.6%
|
|
42
|
-
5 George Kats 0.6%
|
|
43
|
-
5 Scott Nonnenberg 0.6%
|
|
44
|
-
5 Jo Liss 0.6%
|
|
45
|
-
5 Juliusz Gonera 0.6%
|
|
46
|
-
4 Veselin 0.5%
|
|
47
|
-
4 Nick Heiner 0.5%
|
|
48
|
-
4 David da Silva 0.5%
|
|
49
|
-
4 Chris Jones 0.5%
|
|
50
|
-
4 josher19 0.5%
|
|
51
|
-
4 John Firebaugh 0.5%
|
|
52
|
-
4 Max Edmands 0.5%
|
|
53
|
-
4 charlierudolph 0.5%
|
|
54
|
-
3 Ryunosuke SATO 0.3%
|
|
55
|
-
3 Jason Karns 0.3%
|
|
56
|
-
3 Jeff Barczewski 0.3%
|
|
57
|
-
3 Andrei Neculau 0.3%
|
|
58
|
-
3 Duncan Beevers 0.3%
|
|
59
|
-
3 Jake Rosoman 0.3%
|
|
60
|
-
2 Teddy Cross 0.2%
|
|
61
|
-
2 Bartvds 0.2%
|
|
62
|
-
2 Edwin Shao 0.2%
|
|
63
|
-
2 Gregg Lind 0.2%
|
|
64
|
-
2 Roman Masek 0.2%
|
|
65
|
-
2 Jérémie Astori 0.2%
|
|
66
|
-
2 Jakub Nešetřil 0.2%
|
|
67
|
-
2 eldritch fossicker 0.2%
|
|
68
|
-
1 Adam Hull 0.1%
|
|
69
|
-
1 toastynerd 0.1%
|
|
70
|
-
1 Anand Patil 0.1%
|
|
71
|
-
1 Benjamin Horsleben 0.1%
|
|
72
|
-
1 Brandon Payton 0.1%
|
|
73
|
-
1 Chasen Le Hara 0.1%
|
|
74
|
-
1 Chris Connelly 0.1%
|
|
75
|
-
1 Chris Thompson 0.1%
|
|
76
|
-
1 Christopher Hiller 0.1%
|
|
77
|
-
1 Chun-Yi 0.1%
|
|
78
|
-
1 DD 0.1%
|
|
79
|
-
1 Danilo Vaz 0.1%
|
|
80
|
-
1 Dido Arellano 0.1%
|
|
81
|
-
1 Doug Neiner 0.1%
|
|
82
|
-
1 Jeff Welch 0.1%
|
|
83
|
-
1 Jesse McCarthy 0.1%
|
|
84
|
-
1 Julien Wajsberg 0.1%
|
|
85
|
-
1 Kilian Ciuffolo 0.1%
|
|
86
|
-
1 Luís Cardoso 0.1%
|
|
87
|
-
1 Martin Middel 0.1%
|
|
88
|
-
1 Mathias Schreck 0.1%
|
|
89
|
-
1 Michael Lange 0.1%
|
|
90
|
-
1 Niklas Närhinen 0.1%
|
|
91
|
-
1 Paul Miller 0.1%
|
|
92
|
-
1 Refael Ackermann 0.1%
|
|
93
|
-
1 Sasha Koss 0.1%
|
|
94
|
-
1 Victor Costan 0.1%
|
|
95
|
-
1 Vinay Pulim 0.1%
|
|
96
|
-
1 Virginie BARDALES 0.1%
|
|
97
|
-
1 Vlad GURDIGA 0.1%
|
|
98
|
-
1 ericdouglas 0.1%
|
|
99
|
-
1 laconbass 0.1%
|
|
100
|
-
1 mohayonao 0.1%
|
|
101
|
-
1 piecioshka 0.1%
|
|
102
|
-
1 root 0.1%
|
|
103
|
-
1 shinnn 0.1%
|
|
46
|
+
Please see the full
|
|
47
|
+
[Contributors Graph](https://github.com/chaijs/chai/graphs/contributors) for our
|
|
48
|
+
list of contributors.
|
|
49
|
+
|
|
50
|
+
### Core Contributors
|
|
51
|
+
|
|
52
|
+
Feel free to reach out to any of the core-contributors with you questions or
|
|
53
|
+
concerns. We will do our best to respond in a timely manner.
|
|
54
|
+
|
|
55
|
+
[](https://github.com/logicalparadox)
|
|
56
|
+
[](https://github.com/vesln)
|
|
57
|
+
[](https://github.com/keithamus)
|
|
104
58
|
|
|
105
59
|
## License
|
|
106
60
|
|
package/ReleaseNotes.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# Release Notes
|
|
2
2
|
|
|
3
|
+
## Note
|
|
4
|
+
|
|
5
|
+
As of 3.0.0, the ReleaseNotes.md file has been deprecated. [Please refer to the release notes available on Github](https://github.com/chaijs/chai/releases). Or
|
|
6
|
+
[the release notes on the chaijs.com website](https://chaijs.com/releases).
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 2.3.0 / 2015-04-26
|
|
11
|
+
|
|
12
|
+
Added `ownPropertyDescriptor` assertion:
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
expect('test').to.have.ownPropertyDescriptor('length');
|
|
16
|
+
expect('test').to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 4 });
|
|
17
|
+
expect('test').not.to.have.ownPropertyDescriptor('length', { enumerable: false, configurable: false, writable: false, value: 3 });
|
|
18
|
+
expect('test').ownPropertyDescriptor('length').to.have.property('enumerable', false);
|
|
19
|
+
expect('test').ownPropertyDescriptor('length').to.have.keys('value');
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Community Contributions
|
|
23
|
+
|
|
24
|
+
#### Code Features & Fixes
|
|
25
|
+
|
|
26
|
+
* [#408](https://github.com/chaijs/chai/pull/408) Add `ownPropertyDescriptor`
|
|
27
|
+
assertion.
|
|
28
|
+
By [@ljharb](https://github.com/ljharb)
|
|
29
|
+
* [#422](https://github.com/chaijs/chai/pull/422) Improve ownPropertyDescriptor
|
|
30
|
+
tests.
|
|
31
|
+
By [@ljharb](https://github.com/ljharb)
|
|
32
|
+
|
|
33
|
+
#### Documentation fixes
|
|
34
|
+
|
|
35
|
+
* [#417](https://github.com/chaijs/chai/pull/417) Fix documentation typo
|
|
36
|
+
By [@astorije](https://github.com/astorije)
|
|
37
|
+
* [#423](https://github.com/chaijs/chai/pull/423) Fix inconsistency in docs.
|
|
38
|
+
By [@ehntoo](https://github.com/ehntoo)
|
|
39
|
+
|
|
40
|
+
|
|
3
41
|
## 2.2.0 / 2015-03-26
|
|
4
42
|
|
|
5
43
|
Deep property strings can now be escaped using `\\` - for example:
|