Comparing version 2.3.0 to 3.0.0
{ | ||
"name": "chai", | ||
"version": "2.3.0", | ||
"version": "3.0.0", | ||
"description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -143,22 +143,26 @@ # Chai Contribution Guidelines | ||
Releases can be prepared by any core-contributor or user whom has push access to | ||
the `chaijs/chai` repository. | ||
Releases can be **prepared** by anyone with access to the code. | ||
This process requires [git-extras](https://github.com/tj/git-extras) for some steps. | ||
Simply run `make release-major`, `make release-minor`, or `make-release-patch` | ||
and it will automatically do the following: | ||
1. Ensure all tests pass. | ||
2. Bump the version tag in-code and for all package managers. | ||
- `lib/chai.js` | ||
- `package.json` | ||
- `component.json` | ||
- `bower.json` | ||
3. Build the browser version with `make`. | ||
4. Append commit log to `HISTORY.md` using `git changelog` command. | ||
5. Write human-friendly `ReleaseNotes.md` based on changelog. | ||
- Build chai.js | ||
- Bump the version numbers accross the project | ||
- Make a commit within git | ||
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. | ||
### Publishing a Release | ||
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: | ||
1. Go to te [Releases page on Github](https://github.com/chaijs/chai/releases) | ||
2. Hit "Draft a new release" (if you can't see this, you're not a core contributor!) | ||
3. Write human-friendly Release Notes based on changelog. | ||
- The release title is "x.x.x / YYYY-MM-DD" (where x.x.x is the version number) | ||
- If breaking changes, write migration tutorial(s) and reasoning. | ||
- Callouts for community contributions (PRs) with links to PR and contributing user. | ||
- Callouts for other fixes made by core contributors with links to issue. | ||
6. Update `README.md` with an updated contributors list using `git summary` command. | ||
7. Push a tagged release using `git release x.x.x`. | ||
- All tagged releases are published to NPM. | ||
4. Hit "Save Draft" and get other core contributors to check your work, or alternatively hit "Publish release" | ||
5. That's it! | ||
@@ -165,0 +169,0 @@ <a name="support"></a> |
@@ -0,1 +1,8 @@ | ||
### Note | ||
As of 3.0.0, the History.md file has been deprecated. [Please refer to the full | ||
commit logs available on GitHub](https://github.com/chaijs/chai/commits/master). | ||
--- | ||
2.3.0 / 2015-04-26 | ||
@@ -2,0 +9,0 @@ ================== |
@@ -5,3 +5,3 @@ module.exports = function(config) { | ||
, files: [ | ||
'build/build.js' | ||
'chai.js' | ||
, 'test/bootstrap/karma.js' | ||
@@ -8,0 +8,0 @@ , 'test/*.js' |
@@ -14,3 +14,3 @@ /*! | ||
exports.version = '2.3.0'; | ||
exports.version = '3.0.0'; | ||
@@ -17,0 +17,0 @@ /*! |
@@ -84,4 +84,4 @@ /*! | ||
/*! | ||
* ### .assert(expression, message, negateMessage, expected, actual) | ||
/** | ||
* ### .assert(expression, message, negateMessage, expected, actual, showDiff) | ||
* | ||
@@ -88,0 +88,0 @@ * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass. |
@@ -139,3 +139,9 @@ /*! | ||
* expect(undefined).to.be.an('undefined'); | ||
* expect(new Promise).to.be.a('promise'); | ||
* expect(new Float32Array()).to.be.a('float32array'); | ||
* expect(Symbol()).to.be.a('symbol'); | ||
* | ||
* // es6 overrides | ||
* expect({[Symbol.toStringTag]:()=>'foo'}).to.be.a('foo'); | ||
* | ||
* // language chain | ||
@@ -839,3 +845,3 @@ * expect(foo).to.be.an.instanceof(Foo); | ||
if (negate && undefined !== val) { | ||
if (negate && arguments.length > 1) { | ||
if (undefined === value) { | ||
@@ -852,3 +858,3 @@ msg = (msg != null) ? msg + ': ' : ''; | ||
if (undefined !== val) { | ||
if (arguments.length > 1) { | ||
this.assert( | ||
@@ -944,13 +950,7 @@ val === value | ||
/** | ||
* ### .length(value) | ||
* ### .length | ||
* | ||
* Asserts that the target's `length` property has | ||
* the expected value. | ||
* Sets the `doLength` flag later used as a chain precursor to a value | ||
* comparison for the `length` property. | ||
* | ||
* expect([ 1, 2, 3]).to.have.length(3); | ||
* expect('foobar').to.have.length(6); | ||
* | ||
* Can also be used as a chain precursor to a value | ||
* comparison for the length property. | ||
* | ||
* expect('foo').to.have.length.above(2); | ||
@@ -963,4 +963,21 @@ * expect([ 1, 2, 3 ]).to.have.length.above(2); | ||
* | ||
* *Deprecation notice:* Using `length` as an assertion will be deprecated | ||
* in version 2.4.0 and removed in 3.0.0. Code using the old style of | ||
* asserting for `length` property value using `length(value)` should be | ||
* switched to use `lengthOf(value)` instead. | ||
* | ||
* @name length | ||
* @alias lengthOf | ||
* @api public | ||
*/ | ||
/** | ||
* ### .lengthOf(value[, message]) | ||
* | ||
* Asserts that the target's `length` property has | ||
* the expected value. | ||
* | ||
* expect([ 1, 2, 3]).to.have.lengthOf(3); | ||
* expect('foobar').to.have.lengthOf(6); | ||
* | ||
* @name lengthOf | ||
* @param {Number} length | ||
@@ -1001,2 +1018,3 @@ * @param {String} message _optional_ | ||
* @name match | ||
* @alias matches | ||
* @param {RegExp} RegularExpression | ||
@@ -1006,4 +1024,3 @@ * @param {String} message _optional_ | ||
*/ | ||
Assertion.addMethod('match', function (re, msg) { | ||
function assertMatch(re, msg) { | ||
if (msg) flag(this, 'message', msg); | ||
@@ -1016,4 +1033,7 @@ var obj = flag(this, 'object'); | ||
); | ||
}); | ||
} | ||
Assertion.addMethod('match', assertMatch); | ||
Assertion.addMethod('matches', assertMatch); | ||
/** | ||
@@ -1074,3 +1094,3 @@ * ### .string(string) | ||
* expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys(['bar', 'foo']); | ||
* expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys([{'bar': 6}}]); | ||
* expect({ foo: 1, bar: 2, baz: 3 }).to.contain.all.keys({'bar': 6}); | ||
* | ||
@@ -1267,3 +1287,3 @@ * | ||
// next, check message | ||
var message = 'object' === _.type(err) && "message" in err | ||
var message = 'error' === _.type(err) && "message" in err | ||
? err.message | ||
@@ -1270,0 +1290,0 @@ : '' + err; |
@@ -703,3 +703,3 @@ /*! | ||
* for strings and arrays. | ||
*i | ||
* | ||
* assert.notInclude('foobar', 'baz', 'string not include substring'); | ||
@@ -1247,7 +1247,20 @@ * assert.notInclude([ 1, 2, 3 ], 4, 'array not include contain value'); | ||
/*! | ||
* Undocumented / untested | ||
* ### .ifError(object) | ||
* | ||
* Asserts if value is not a false value, and throws if it is a true value. | ||
* This is added to allow for chai to be a drop-in replacement for Node's | ||
* assert class. | ||
* | ||
* var err = new Error('I am a custom error'); | ||
* assert.ifError(err); // Rethrows err! | ||
* | ||
* @name ifError | ||
* @param {Object} object | ||
* @api public | ||
*/ | ||
assert.ifError = function (val, msg) { | ||
new Assertion(val, msg).to.not.be.ok; | ||
assert.ifError = function (val) { | ||
if (val) { | ||
throw(val); | ||
} | ||
}; | ||
@@ -1254,0 +1267,0 @@ |
@@ -37,3 +37,3 @@ /*! | ||
name: last.p || last.i, | ||
value: _getPathValue(parsed, obj), | ||
value: _getPathValue(parsed, obj) | ||
}; | ||
@@ -40,0 +40,0 @@ info.exists = hasProperty(info.name, info.parent); |
@@ -7,3 +7,3 @@ /*! | ||
var type = require('./type'); | ||
var type = require('type-detect'); | ||
@@ -10,0 +10,0 @@ /** |
@@ -23,3 +23,3 @@ /*! | ||
exports.type = require('./type'); | ||
exports.type = require('type-detect'); | ||
@@ -26,0 +26,0 @@ /*! |
@@ -20,3 +20,3 @@ { | ||
], | ||
"version": "2.3.0", | ||
"version": "3.0.0", | ||
"repository": { | ||
@@ -37,15 +37,17 @@ "type": "git", | ||
"dependencies": { | ||
"assertion-error": "1.0.0", | ||
"deep-eql": "0.1.3" | ||
"assertion-error": "^1.0.1", | ||
"deep-eql": "^0.1.3", | ||
"type-detect": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"component": "*", | ||
"karma": "0.12.x", | ||
"karma-mocha": "*", | ||
"karma-sauce-launcher": "0.2.x", | ||
"karma-phantomjs-launcher": "0.1.1", | ||
"karma-firefox-launcher": "^0.1.4", | ||
"mocha": "1.21.x", | ||
"istanbul": "0.2.x" | ||
"browserify": "^10.2.1", | ||
"bump-cli": "^1.1.3", | ||
"karma": "^0.12.0", | ||
"karma-mocha": "^0.1.10", | ||
"karma-sauce-launcher": "^0.2.11", | ||
"karma-phantomjs-launcher": "^0.2.0", | ||
"karma-firefox-launcher": "^0.1.6", | ||
"mocha": "^2.2.5", | ||
"istanbul": "^0.3.14" | ||
} | ||
} |
108
README.md
[![Chai Documentation](http://chaijs.com/public/img/chai-logo.png)](http://chaijs.com) | ||
[![license:mit](https://img.shields.io/badge/license-mit-green.svg?style=flat-square)](#license)<br> | ||
[![tag:?](https://img.shields.io/github/tag/chaijs/chai.svg?style=flat-square)](https://github.com/chaijs/chai/releases) | ||
[![build:?](https://img.shields.io/travis/chaijs/chai/master.svg?style=flat-square)](https://travis-ci.org/chaijs/chai) | ||
[![coverage:?](https://img.shields.io/coveralls/chaijs/chai/master.svg?style=flat-square)](https://coveralls.io/r/chaijs/chai)<br> | ||
[![npm:](https://img.shields.io/npm/v/chai.svg?style=flat-square)](https://www.npmjs.com/packages/chai) | ||
[![dependencies:?](https://img.shields.io/npm/dm/chai.svg?style=flat-square)](https://www.npmjs.com/packages/chai) | ||
[![devDependencies:?](https://img.shields.io/david/chaijs/chai.svg?style=flat-square)](https://david-dm.org/chaijs/chai) | ||
[![Selenium Test Status](https://saucelabs.com/browser-matrix/chaijs.svg)](https://saucelabs.com/u/chaijs) | ||
Chai is a BDD / TDD assertion library for [node](http://nodejs.org) and the browser that | ||
@@ -8,6 +19,2 @@ can be delightfully paired with any javascript testing framework. | ||
[![Build Status](https://travis-ci.org/chaijs/chai.svg?branch=master)](https://travis-ci.org/chaijs/chai) | ||
[![Selenium Test Status](https://saucelabs.com/browser-matrix/chaijs.svg)](https://saucelabs.com/u/chaijs) | ||
### Plugins | ||
@@ -25,86 +32,19 @@ | ||
- [chaijs / deep-eql](https://github.com/chaijs/deep-eql): Improved deep equality testing for Node.js and the browser. | ||
- [chaijs / type-detect](https://github.com/chaijs/type-detect): Improved typeof detection for node.js and the browser. | ||
### Contributors | ||
project : chai | ||
repo age : 3 years, 5 months | ||
active : 244 days | ||
commits : 900 | ||
files : 59 | ||
authors : | ||
555 Jake Luer 61.7% | ||
79 Veselin Todorov 8.8% | ||
52 Keith Cirkel 5.8% | ||
43 Domenic Denicola 4.8% | ||
14 Joshua Perry 1.6% | ||
8 Chris Polis 0.9% | ||
6 Ruben Verborgh 0.7% | ||
6 Ian Zamojc 0.7% | ||
5 George Kats 0.6% | ||
5 leider 0.6% | ||
5 Scott Nonnenberg 0.6% | ||
5 Juliusz Gonera 0.6% | ||
5 Jo Liss 0.6% | ||
4 Jérémie Astori 0.4% | ||
4 John Firebaugh 0.4% | ||
4 charlierudolph 0.4% | ||
4 Veselin 0.4% | ||
4 Chris Jones 0.4% | ||
4 Nick Heiner 0.4% | ||
4 Max Edmands 0.4% | ||
4 David da Silva 0.4% | ||
4 Kaito Udagawa 0.4% | ||
4 josher19 0.4% | ||
3 Jordan Harband 0.3% | ||
3 Ryunosuke SATO 0.3% | ||
3 Jake Rosoman 0.3% | ||
3 Duncan Beevers 0.3% | ||
3 Jason Karns 0.3% | ||
3 Jeff Barczewski 0.3% | ||
3 Andrei Neculau 0.3% | ||
2 eldritch fossicker 0.2% | ||
2 Bartvds 0.2% | ||
2 Edwin Shao 0.2% | ||
2 Gregg Lind 0.2% | ||
2 Jakub Nešetřil 0.2% | ||
2 Roman Masek 0.2% | ||
2 Teddy Cross 0.2% | ||
1 Jesse McCarthy 0.1% | ||
1 Doug Neiner 0.1% | ||
1 Dido Arellano 0.1% | ||
1 Kilian Ciuffolo 0.1% | ||
1 Luís Cardoso 0.1% | ||
1 Martin Middel 0.1% | ||
1 Mathias Schreck 0.1% | ||
1 Danilo Vaz 0.1% | ||
1 Michael Lange 0.1% | ||
1 Mitchell Johnson 0.1% | ||
1 DD 0.1% | ||
1 Niklas Närhinen 0.1% | ||
1 Paul Miller 0.1% | ||
1 Refael Ackermann 0.1% | ||
1 shinnn 0.1% | ||
1 Chun-Yi 0.1% | ||
1 Christopher Hiller 0.1% | ||
1 Sasha Koss 0.1% | ||
1 Chris Thompson 0.1% | ||
1 toastynerd 0.1% | ||
1 Chris Connelly 0.1% | ||
1 Chasen Le Hara 0.1% | ||
1 Victor Costan 0.1% | ||
1 Vinay Pulim 0.1% | ||
1 Virginie BARDALES 0.1% | ||
1 Vlad GURDIGA 0.1% | ||
1 Brandon Payton 0.1% | ||
1 Adam Hull 0.1% | ||
1 ericdouglas 0.1% | ||
1 Benjamin Horsleben 0.1% | ||
1 laconbass 0.1% | ||
1 Anand Patil 0.1% | ||
1 mohayonao 0.1% | ||
1 piecioshka 0.1% | ||
1 root 0.1% | ||
1 Julien Wajsberg 0.1% | ||
1 Jeff Welch 0.1% | ||
Please see the full | ||
[Contributors Graph](https://github.com/chaijs/chai/graphs/contributors) for our | ||
list of contributors. | ||
### Core Contributors | ||
Feel free to reach out to any of the core-contributors with you questions or | ||
concerns. We will do our best to respond in a timely manner. | ||
[![Jake Luer](https://avatars3.githubusercontent.com/u/58988?v=3&s=50)](https://github.com/logicalparadox) | ||
[![Veselin Todorov](https://avatars3.githubusercontent.com/u/330048?v=3&s=50)](https://github.com/vesln) | ||
[![Keith Cirkel](https://avatars3.githubusercontent.com/u/118266?v=3&s=50)](https://github.com/keithamus) | ||
## License | ||
@@ -111,0 +51,0 @@ |
# Release Notes | ||
## Note | ||
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 | ||
[the release notes on the chaijs.com website](https://chaijs.com/releases). | ||
--- | ||
## 2.3.0 / 2015-04-26 | ||
@@ -4,0 +11,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
0
346453
3
9
39
9001
71
+ Addedtype-detect@^1.0.0
+ Addedassertion-error@1.1.0(transitive)
+ Addedtype-detect@1.0.0(transitive)
- Removedassertion-error@1.0.0(transitive)
Updatedassertion-error@^1.0.1
Updateddeep-eql@^0.1.3