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