mirror of
https://github.com/chaijs/chai
synced 2024-11-14 15:57:10 +00:00
Release 0.3.1
This commit is contained in:
parent
912208266b
commit
abdcf3786d
4 changed files with 11 additions and 6 deletions
|
@ -1,4 +1,9 @@
|
|||
|
||||
0.3.1 / 2012-02-07
|
||||
==================
|
||||
|
||||
* node 0.4.x compat
|
||||
|
||||
0.3.0 / 2012-02-07
|
||||
==================
|
||||
|
||||
|
|
8
chai.js
8
chai.js
|
@ -841,7 +841,7 @@ Assertion.prototype.throw = function (constructor) {
|
|||
try {
|
||||
this.obj();
|
||||
} catch (err) {
|
||||
if (constructor && 'function' === typeof constructor) {
|
||||
if (constructor && 'function' === typeof constructor && constructor.constructor != RegExp) {
|
||||
this.assert(
|
||||
err instanceof constructor && err.name == constructor.name
|
||||
, 'expected ' + this.inspect + ' to throw ' + constructor.name + ' but a ' + err.name + ' was thrown'
|
||||
|
@ -850,8 +850,8 @@ Assertion.prototype.throw = function (constructor) {
|
|||
} else if (constructor && constructor instanceof RegExp) {
|
||||
this.assert(
|
||||
constructor.exec(err.message)
|
||||
, 'expected ' + this.inspect + ' to throw error matching ' + inspect(constructor) + ' but got ' + inspect(err.message)
|
||||
, 'expected ' + this.inspect + ' to throw error not matching ' + inspect(constructor) );
|
||||
, 'expected ' + this.inspect + ' to throw error matching ' + constructor + ' but got ' + inspect(err.message)
|
||||
, 'expected ' + this.inspect + ' to throw error not matching ' + constructor);
|
||||
return this;
|
||||
} else {
|
||||
thrown = true;
|
||||
|
@ -897,7 +897,7 @@ require.register("chai.js", function(module, exports, require){
|
|||
var used = [];
|
||||
var exports = module.exports = {};
|
||||
|
||||
exports.version = '0.3.0';
|
||||
exports.version = '0.3.1';
|
||||
|
||||
exports.Assertion = require('./assertion');
|
||||
exports.AssertionError = require('./error');
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
var used = [];
|
||||
var exports = module.exports = {};
|
||||
|
||||
exports.version = '0.3.0';
|
||||
exports.version = '0.3.1';
|
||||
|
||||
exports.Assertion = require('./assertion');
|
||||
exports.AssertionError = require('./error');
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"name": "chai",
|
||||
"description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic.",
|
||||
"keywords": [ "test", "assertion", "assert", "testing" ],
|
||||
"version": "0.3.0",
|
||||
"version": "0.3.1",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/logicalparadox/chai"
|
||||
|
|
Loading…
Reference in a new issue