Skip to content

Commit

Permalink
test: added message argument to negated nested-, deep-, own- and deep…
Browse files Browse the repository at this point in the history
…OwnInclude
  • Loading branch information
zetamorph committed May 4, 2017
1 parent 40bb490 commit 4180242
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -771,8 +771,8 @@ describe('assert', function () {
}, "expected { a: { b: [ 'x', 'y' ] } } to have nested property 'a.c'");

err(function () {
assert.notNestedInclude({a: {b: ['x', 'y']}}, {'a.b[1]': 'y'});
}, "expected { a: { b: [ 'x', 'y' ] } } to not have nested property 'a.b[1]' of 'y'");
assert.notNestedInclude({a: {b: ['x', 'y']}}, {'a.b[1]': 'y'}, 'blah');
}, "blah: expected { a: { b: [ 'x', 'y' ] } } to not have nested property 'a.b[1]' of 'y'");
});

it('deepNestedInclude and notDeepNestedInclude', function() {
Expand All @@ -796,8 +796,8 @@ describe('assert', function () {
}, "expected { a: { b: [ [Object] ] } } to have deep nested property 'a.c'");

err(function () {
assert.notDeepNestedInclude({a: {b: [{x: 1}]}}, {'a.b[0]': {x: 1}});
}, "expected { a: { b: [ [Object] ] } } to not have deep nested property 'a.b[0]' of { x: 1 }");
assert.notDeepNestedInclude({a: {b: [{x: 1}]}}, {'a.b[0]': {x: 1}}, 'blah');
}, "blah: expected { a: { b: [ [Object] ] } } to not have deep nested property 'a.b[0]' of { x: 1 }");
});

it('ownInclude and notOwnInclude', function() {
Expand All @@ -820,8 +820,8 @@ describe('assert', function () {
}, "expected { a: 1 } to have own property 'toString'");

err(function () {
assert.notOwnInclude({a: 1}, {a: 1});
}, "expected { a: 1 } to not have own property 'a' of 1");
assert.notOwnInclude({a: 1}, {a: 1}, 'blah');
}, "blah: expected { a: 1 } to not have own property 'a' of 1");
});

it('deepOwnInclude and notDeepOwnInclude', function() {
Expand All @@ -842,8 +842,8 @@ describe('assert', function () {
}, "expected { a: { b: 2 } } to have deep own property 'toString'");

err(function () {
assert.notDeepOwnInclude({a: {b: 2}}, {a: {b: 2}});
}, "expected { a: { b: 2 } } to not have deep own property 'a' of { b: 2 }");
assert.notDeepOwnInclude({a: {b: 2}}, {a: {b: 2}}, 'blah');
}, "blah: expected { a: { b: 2 } } to not have deep own property 'a' of { b: 2 }");
});

it('keys(array|Object|arguments)', function(){
Expand Down

0 comments on commit 4180242

Please sign in to comment.