diff --git a/lib/test.js b/lib/test.js index 926da137..90bbedf6 100644 --- a/lib/test.js +++ b/lib/test.js @@ -30,12 +30,11 @@ function getTestArgs(name_, opts_, cb_) { for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; - var t = typeof arg; - if (t === 'string') { + if (typeof arg === 'string') { name = arg; - } else if (t === 'object') { + } else if (typeof arg === 'object') { opts = arg || opts; - } else if (t === 'function') { + } else if (typeof arg === 'function') { cb = arg; } }