@@ -1013,7 +1013,7 @@ module.exports = function (chai, util) {
10131013 } ;
10141014
10151015 /**
1016- * ### .nestedInclude
1016+ * ### .nestedInclude(targetObj, nestedObject, [msg])
10171017 *
10181018 * Asserts that 'targetObject' includes 'nestedObject'.
10191019 * Enables the use of dot- and bracket-notation for referencing nested properties.
@@ -1035,7 +1035,7 @@ module.exports = function (chai, util) {
10351035 } ;
10361036
10371037 /**
1038- * ### .notNestedInclude
1038+ * ### .notNestedInclude(targetObj, nestedObj, [msg])
10391039 *
10401040 * Asserts that 'targetObject' does not include 'nestedObject'.
10411041 * Enables the use of dot- and bracket-notation for referencing nested properties.
@@ -1057,6 +1057,50 @@ module.exports = function (chai, util) {
10571057 new Assertion ( exp , msg , assert . notNestedInclude , true ) . not . nested . include ( inc ) ;
10581058 } ;
10591059
1060+ /**
1061+ * ### .deepNestedInclude(targetObject, nestedObject, [msg])
1062+ *
1063+ * Asserts that 'targetObj' includes 'nestedObject' while checking for deep equality.
1064+ * Enables the user of dot- and bracket-notation for referencing nested properties.
1065+ * '[]' and '.' in property names can be escaped using double backslashes.
1066+ *
1067+ * assert.deepNestedInclude({a: {b: [{x: 1}]}}, {'a.b[0]': {x: 1}})
1068+ * assert.deepNestedInclude({'.a': {'[b]': {x: 1}}}, {'\\.a.\\[b\\]': {x: 1}});
1069+ *
1070+ * @name deepNestedInclude
1071+ * @param {Object } targetObject
1072+ * @param {Object } nestedObject
1073+ * @param {String } message
1074+ * @namespace Assert
1075+ * @api public
1076+ */
1077+
1078+ assert . deepNestedInclude = function ( exp , inc , msg ) {
1079+ new Assertion ( exp , msg , assert . deepNestedInclude , true ) . deep . nested . include ( inc ) ;
1080+ } ;
1081+
1082+ /**
1083+ * ### .notDeepNestedInclude(targetObject, nestedObject, [msg])
1084+ *
1085+ * Asserts that 'targetObj' does not include 'nestedObject' while checking for deep equality.
1086+ * Enables the user of dot- and bracket-notation for referencing nested properties.
1087+ * '[]' and '.' in property names can be escaped using double backslashes.
1088+ *
1089+ * assert.notDeepNestedInclude({a: {b: [{x: 1}]}}, {'a.b[0]': {y: 1}})
1090+ * assert.notDeepNestedInclude({'.a': {'[b]': {x: 1}}}, {'\\.a.\\[b\\]': {y: 2}});
1091+ *
1092+ * @name notDeepNestedInclude
1093+ * @param {Object } targetObject
1094+ * @param {Object } nestedObject
1095+ * @param {String } message
1096+ * @namespace Assert
1097+ * @api public
1098+ */
1099+
1100+ assert . notDeepNestedInclude = function ( exp , inc , msg ) {
1101+ new Assertion ( exp , msg , assert . notDeepNestedInclude , true ) . not . deep . nested . include ( inc ) ;
1102+ } ;
1103+
10601104 /**
10611105 * ### .match(value, regexp, [message])
10621106 *
0 commit comments