Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chai

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chai - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

test/assert-config.js

41

chai.js

@@ -87,2 +87,10 @@ !function (name, definition) {

* extensions to `Object.prototype` so it is not recommended for browser use.
*
* #### Configuration
*
* By default, Chai does not show stack traces upon an AssertionError. This can
* be changed by modifying the `includeStack` parameter for chai.Assertion. For example:
*
* var chai = require('chai');
* chai.Assertion.includeStack = true; // defaults to false
*/

@@ -104,2 +112,3 @@

/*!

@@ -120,2 +129,16 @@ * # Assertion Constructor

/*!
* ## Assertion.includeStack
*
* User configurable property, influences whether stack trace
* is included in Assertion error message. Default of false
* suppresses stack trace in the error message
*
* Assertion.includeStack = true; // enable stack on error
*
* @api public
*/
Assertion.includeStack = false;
/*!
* # .assert(expression, message, negateMessage)

@@ -129,3 +152,3 @@ *

* @param {String} negatedMessage to display if negated expression fails
* @api privage
* @api private
*/

@@ -141,3 +164,3 @@

message: msg,
stackStartFunction: this.ssfi
stackStartFunction: (Assertion.includeStack) ? this.assert : this.ssfi
});

@@ -721,3 +744,3 @@ }

*
* expect([1,2,3]).to.contain(2);
* expect([1,2,3]).to.include(2);
*

@@ -743,3 +766,3 @@ * @name include

*
* expect('foobar').to.include.string('bar');
* expect('foobar').to.have.string('bar');
*

@@ -924,3 +947,3 @@ * @name string

exports.version = '0.3.3';
exports.version = '0.3.4';

@@ -1035,2 +1058,10 @@ exports.Assertion = require('./assertion');

* assert.equal(foo, 'bar');
*
* #### Configuration
*
* By default, Chai does not show stack traces upon an AssertionError. This can
* be changed by modifying the `includeStack` parameter for chai.Assertion. For example:
*
* var chai = require('chai');
* chai.Assertion.includeStack = true; // defaults to false
*/

@@ -1037,0 +1068,0 @@

0.3.4 / 2012-02-23
==================
* inline comment typos for #15
* Merge branch 'refs/heads/jeffbski-configErrorStackCompat'
* includeStack documentation for all interfaces
* suite name more generic
* Update test to be compatible with browsers that do not support err.stack
* udpated compiled chai.js and added to browser tests
* Allow inclusion of stack trace for Assert error messages to be configurable
* docs sharing buttons
* sinon-chai link
* doc updates
* read me updates include plugins
0.3.3 / 2012-02-12

@@ -3,0 +18,0 @@ ==================

@@ -34,2 +34,10 @@ /*!

* extensions to `Object.prototype` so it is not recommended for browser use.
*
* #### Configuration
*
* By default, Chai does not show stack traces upon an AssertionError. This can
* be changed by modifying the `includeStack` parameter for chai.Assertion. For example:
*
* var chai = require('chai');
* chai.Assertion.includeStack = true; // defaults to false
*/

@@ -51,2 +59,3 @@

/*!

@@ -67,2 +76,16 @@ * # Assertion Constructor

/*!
* ## Assertion.includeStack
*
* User configurable property, influences whether stack trace
* is included in Assertion error message. Default of false
* suppresses stack trace in the error message
*
* Assertion.includeStack = true; // enable stack on error
*
* @api public
*/
Assertion.includeStack = false;
/*!
* # .assert(expression, message, negateMessage)

@@ -76,3 +99,3 @@ *

* @param {String} negatedMessage to display if negated expression fails
* @api privage
* @api private
*/

@@ -88,3 +111,3 @@

message: msg,
stackStartFunction: this.ssfi
stackStartFunction: (Assertion.includeStack) ? this.assert : this.ssfi
});

@@ -668,3 +691,3 @@ }

*
* expect([1,2,3]).to.contain(2);
* expect([1,2,3]).to.include(2);
*

@@ -690,3 +713,3 @@ * @name include

*
* expect('foobar').to.include.string('bar');
* expect('foobar').to.have.string('bar');
*

@@ -693,0 +716,0 @@ * @name string

2

lib/chai.js

@@ -10,3 +10,3 @@ /*!

exports.version = '0.3.3';
exports.version = '0.3.4';

@@ -13,0 +13,0 @@ exports.Assertion = require('./assertion');

@@ -21,2 +21,10 @@ /*!

* assert.equal(foo, 'bar');
*
* #### Configuration
*
* By default, Chai does not show stack traces upon an AssertionError. This can
* be changed by modifying the `includeStack` parameter for chai.Assertion. For example:
*
* var chai = require('chai');
* chai.Assertion.includeStack = true; // defaults to false
*/

@@ -23,0 +31,0 @@

@@ -6,3 +6,3 @@ {

"keywords": [ "test", "assertion", "assert", "testing" ],
"version": "0.3.3",
"version": "0.3.4",
"repository": {

@@ -9,0 +9,0 @@ "type": "git",

@@ -30,7 +30,27 @@ [![Build Status](https://secure.travis-ci.org/logicalparadox/chai.png)](http://travis-ci.org/logicalparadox/chai)

## Tests
## Plugins
Chai tests itself in the browser using [mocha](https://github.com/visionmedia/mocha).
Have a look at the `test/browser` folder for an example.
The Chai community is growing! Plugins allow developers to expand Chai's available
assertions. Here is what the community has come up with so far:
* [chai-spies](https://github.com/logicalparadox/chai-spies) is a basic spy implementation for chai. It's also
a good resource for building chai plugins that work in both node.js and the browser.
* [chai-jquery](https://github.com/jfirebaugh/chai-jquery) by [@jfirebaugh](https://github.com/jfirebaugh)
provides deep jQuery integration with chai's `should` and `expect`.
* [jack](https://github.com/vesln/jack) by [@vesln](https://github.com/vesln) is a mock/stub library that
can be used as a stand-alone or with chai.
* [sinon-chai](https://github.com/domenic/sinon-chai) by [@domenic](https://github.com/domenic) extends chai with
assertions for the Sinon.js mocking framework.
## Contributors
project: chai
commits: 145
files : 57
authors:
142 Jake Luer 97.9%
1 Domenic Denicola 0.7%
1 John Firebaugh 0.7%
1 Vinay Pulim 0.7%
## License

@@ -40,3 +60,3 @@

Copyright (c) 2011 Jake Luer <jake@alogicalparadox.com>
Copyright (c) 2011-2012 Jake Luer <jake@alogicalparadox.com>

@@ -43,0 +63,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc