@@ -1013,9 +1013,9 @@ module.exports = function (chai, util) {
1013
1013
} ;
1014
1014
1015
1015
/**
1016
- * ### .nestedInclude(targetObject, nestedObject , [message])
1016
+ * ### .nestedInclude(object1, object2 , [message])
1017
1017
*
1018
- * Asserts that 'targetObject ' includes 'nestedObject '.
1018
+ * Asserts that 'object1 ' includes 'object2 '.
1019
1019
* Enables the use of dot- and bracket-notation for referencing nested
1020
1020
* properties.
1021
1021
* '[]' and '.' in property names can be escaped using double backslashes.
@@ -1024,8 +1024,8 @@ module.exports = function (chai, util) {
1024
1024
* assert.nestedInclude({'a': {'[b]': 'x'}}, {'a.\\[b\\]': 'x'});
1025
1025
*
1026
1026
* @name nestedInclude
1027
- * @param {Object } targetObject
1028
- * @param {Object } nestedObject
1027
+ * @param {Object } object1
1028
+ * @param {Object } object2
1029
1029
* @param {String } message
1030
1030
* @namespace Assert
1031
1031
* @api public
@@ -1036,20 +1036,19 @@ module.exports = function (chai, util) {
1036
1036
} ;
1037
1037
1038
1038
/**
1039
- * ### .notNestedInclude(targetObject, nestedObject , [message])
1039
+ * ### .notNestedInclude(object1, object2 , [message])
1040
1040
*
1041
- * Asserts that 'targetObject ' does not include 'nestedObject '.
1041
+ * Asserts that 'object1 ' does not include 'object2 '.
1042
1042
* Enables the use of dot- and bracket-notation for referencing nested
1043
1043
* properties.
1044
1044
* '[]' and '.' in property names can be escaped using double backslashes.
1045
1045
*
1046
- * assert.notNestedInclude({'.a': {'b': 'x'}}, {'\\.a.[b] ': 'y'});
1046
+ * assert.notNestedInclude({'.a': {'b': 'x'}}, {'\\.a.b ': 'y'});
1047
1047
* assert.notNestedInclude({'a': {'[b]': 'x'}}, {'a.\\[b\\]': 'y'});
1048
1048
*
1049
- *
1050
1049
* @name notNestedInclude
1051
- * @param {Object } targetObject
1052
- * @param {Object } nestedObject
1050
+ * @param {Object } object1
1051
+ * @param {Object } object2
1053
1052
* @param {String } message
1054
1053
* @namespace Assert
1055
1054
* @api public
@@ -1061,20 +1060,20 @@ module.exports = function (chai, util) {
1061
1060
} ;
1062
1061
1063
1062
/**
1064
- * ### .deepNestedInclude(targetObject, nestedObject , [message])
1063
+ * ### .deepNestedInclude(object1, object2 , [message])
1065
1064
*
1066
- * Asserts that 'targetObject ' includes 'nestedObject ' while checking for
1065
+ * Asserts that 'object1 ' includes 'object2 ' while checking for
1067
1066
* deep equality.
1068
1067
* Enables the use of dot- and bracket-notation for referencing nested
1069
1068
* properties.
1070
1069
* '[]' and '.' in property names can be escaped using double backslashes.
1071
1070
*
1072
- * assert.deepNestedInclude({a: {b: [{x: 1}]}}, {'a.b[0]': {x: 1}})
1071
+ * assert.deepNestedInclude({a: {b: [{x: 1}]}}, {'a.b[0]': {x: 1}});
1073
1072
* assert.deepNestedInclude({'.a': {'[b]': {x: 1}}}, {'\\.a.\\[b\\]': {x: 1}});
1074
1073
*
1075
1074
* @name deepNestedInclude
1076
- * @param {Object } targetObject
1077
- * @param {Object } nestedObject
1075
+ * @param {Object } object1
1076
+ * @param {Object } object2
1078
1077
* @param {String } message
1079
1078
* @namespace Assert
1080
1079
* @api public
@@ -1086,9 +1085,9 @@ module.exports = function (chai, util) {
1086
1085
} ;
1087
1086
1088
1087
/**
1089
- * ### .notDeepNestedInclude(targetObject, nestedObject , [message])
1088
+ * ### .notDeepNestedInclude(object1, object2 , [message])
1090
1089
*
1091
- * Asserts that 'targetObject ' does not include 'nestedObject ' while
1090
+ * Asserts that 'object1 ' does not include 'object2 ' while
1092
1091
* checking for deep equality.
1093
1092
* Enables the use of dot- and bracket-notation for referencing nested
1094
1093
* properties.
@@ -1098,8 +1097,8 @@ module.exports = function (chai, util) {
1098
1097
* assert.notDeepNestedInclude({'.a': {'[b]': {x: 1}}}, {'\\.a.\\[b\\]': {y: 2}});
1099
1098
*
1100
1099
* @name notDeepNestedInclude
1101
- * @param {Object } targetObject
1102
- * @param {Object } nestedObject
1100
+ * @param {Object } object1
1101
+ * @param {Object } object2
1103
1102
* @param {String } message
1104
1103
* @namespace Assert
1105
1104
* @api public
@@ -1111,16 +1110,16 @@ module.exports = function (chai, util) {
1111
1110
} ;
1112
1111
1113
1112
/**
1114
- * ### .ownInclude(targetObject, objectToBeIncluded , [message])
1113
+ * ### .ownInclude(object1, object2 , [message])
1115
1114
*
1116
- * Asserts that 'targetObject ' includes 'objectToBeIncluded ' while
1115
+ * Asserts that 'object1 ' includes 'object2 ' while
1117
1116
* ignoring inherited properties.
1118
1117
*
1119
- * assert.OwnInclude ({ a: 1 }, { a: 1 });
1118
+ * assert.ownInclude ({ a: 1 }, { a: 1 });
1120
1119
*
1121
1120
* @name ownInclude
1122
- * @param {Object } targetObject
1123
- * @param {Object } objectToBeIncluded
1121
+ * @param {Object } object1
1122
+ * @param {Object } object2
1124
1123
* @param {String } message
1125
1124
* @namespace Assert
1126
1125
* @api public
@@ -1131,18 +1130,18 @@ module.exports = function (chai, util) {
1131
1130
} ;
1132
1131
1133
1132
/**
1134
- * ### .notOwnInclude(targetObject, objectToNotBeIncluded , [message])
1133
+ * ### .notOwnInclude(object1, object2 , [message])
1135
1134
*
1136
- * Asserts that 'targetObject ' does not include 'objectToNotBeIncluded ' while
1135
+ * Asserts that 'object1 ' does not include 'object2 ' while
1137
1136
* ignoring inherited properties.
1138
1137
*
1139
1138
* Object.prototype.b = 2;
1140
1139
*
1141
1140
* assert.notOwnInclude({ a: 1 }, { b: 2 });
1142
1141
*
1143
1142
* @name notOwnInclude
1144
- * @param {Object } targetObject
1145
- * @param {Object } objectToNotBeIncluded
1143
+ * @param {Object } object1
1144
+ * @param {Object } object2
1146
1145
* @param {String } message
1147
1146
* @namespace Assert
1148
1147
* @api public
@@ -1152,6 +1151,50 @@ module.exports = function (chai, util) {
1152
1151
new Assertion ( exp , msg , assert . notOwnInclude , true ) . not . own . include ( inc ) ;
1153
1152
} ;
1154
1153
1154
+ /**
1155
+ * ### .deepOwnInclude(object1, object2, [message])
1156
+ *
1157
+ * Asserts that 'object1' includes 'object2' while
1158
+ * ignoring inherited properties.
1159
+ * Deep equality is used.
1160
+ *
1161
+ * assert.deepOwnInclude({a: {b: 2}}, {a: {b: 2}});
1162
+ *
1163
+ * @name deepOwnInclude
1164
+ * @param {Object } object1
1165
+ * @param {Object } object2
1166
+ * @param {String } message
1167
+ * @namespace Assert
1168
+ * @api public
1169
+ */
1170
+
1171
+ assert . deepOwnInclude = function ( exp , inc , msg ) {
1172
+ new Assertion ( exp , msg , assert . deepOwnInclude , true )
1173
+ . deep . own . include ( inc ) ;
1174
+ } ;
1175
+
1176
+ /**
1177
+ * ### .notDeepOwnInclude(object1, object2, [message])
1178
+ *
1179
+ * Asserts that 'object1' does not include 'object2' while
1180
+ * ignoring inherited properties.
1181
+ * Deep equality is used.
1182
+ *
1183
+ * assert.notDeepOwnInclude({a: {b: 2}}, {a: {c: 3}});
1184
+ *
1185
+ * @name notDeepOwnInclude
1186
+ * @param {Object } object1
1187
+ * @param {Object } object2
1188
+ * @param {String } message
1189
+ * @namespace Assert
1190
+ * @api public
1191
+ */
1192
+
1193
+ assert . notDeepOwnInclude = function ( exp , inc , msg ) {
1194
+ new Assertion ( exp , msg , assert . notDeepOwnInclude , true )
1195
+ . not . deep . own . include ( inc ) ;
1196
+ } ;
1197
+
1155
1198
/**
1156
1199
* ### .match(value, regexp, [message])
1157
1200
*
0 commit comments