Skip to content

Commit

Permalink
Merge pull request #131 from meeber/chai-v4
Browse files Browse the repository at this point in the history
Update for Chai v4.0
  • Loading branch information
keithamus committed May 26, 2017
2 parents cf52191 + 7426715 commit 6e88c38
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -55,7 +55,7 @@
},
"devDependencies": {
"simplifyify": "^2.0.1",
"chai": "*",
"chai": "4",
"coveralls": "^2.11.9",
"dox": "^0.8.1",
"es6-shim": "^0.35.1",
Expand Down
24 changes: 12 additions & 12 deletions test/http.js
Expand Up @@ -249,27 +249,27 @@ describe('assertions', function () {

(function () {
req.should.not.have.param('foo', 'bar');
}).should.throw(/expected .* to not have a property \'foo\' of \'bar\'/);
}).should.throw(/expected .* to not have property \'foo\' of \'bar\'/);
});

it('#param (deep)', function () {
it('#param (nested)', function () {
var req = { url: '/test?form[name]=jim&form[lastName]=bob' };
req.should.have.param('form');
req.should.have.deep.param('form.name');
req.should.have.deep.param('form.name', 'jim');
req.should.have.deep.param('form.lastName');
req.should.have.deep.param('form.lastName', 'bob');
req.should.have.nested.param('form.name');
req.should.have.nested.param('form.name', 'jim');
req.should.have.nested.param('form.lastName');
req.should.have.nested.param('form.lastName', 'bob');
req.should.not.have.param('bar');
req.should.not.have.deep.param('form.bar');
req.should.not.have.deep.param('form.name', 'sue');
req.should.not.have.nested.param('form.bar');
req.should.not.have.nested.param('form.name', 'sue');

(function () {
req.should.not.have.deep.param('form.name');
}).should.throw(/expected .* to not have deep property \'form.name\'/);
req.should.not.have.nested.param('form.name');
}).should.throw(/expected .* to not have nested property \'form.name\'/);

(function () {
req.should.not.have.deep.param('form.lastName', 'bob');
}).should.throw(/expected .* to not have a deep property \'form.lastName\' of \'bob\'/);
req.should.not.have.nested.param('form.lastName', 'bob');
}).should.throw(/expected .* to not have nested property \'form.lastName\' of \'bob\'/);
});

it('#cookie', function () {
Expand Down

0 comments on commit 6e88c38

Please sign in to comment.