add isArray to the cap validation strategies
MODIFY
lib/basedriver/desired-caps.js
lib/basedriver/desired-caps.js
@@ -109,6 +109,17 @@ validator.validators.isObject = function isObject (value) {
return 'must be of type object';
};
+validator.validators.isArray = function isArray (value) {
+ if (Array.isArray(value)) {
+ return null;
+ }
+
+ if (typeof value === 'undefined') {
+ return null;
+ }
+
+ return 'must be of type array';
+};
validator.validators.deprecated = function deprecated (value, options, key) {
if (options) {
log.warn(`${key} is a deprecated capability`);

add isArray to the cap validation strategies