allow util.arrayify to take arbitrary types and coerce it into an array - #1398
This commit is contained in:
@@ -72,10 +72,7 @@ suite("util", function () {
|
||||
assert.deepEqual(util.arrayify("foo"), ["foo"]);
|
||||
assert.deepEqual(util.arrayify("foo,bar"), ["foo", "bar"]);
|
||||
assert.deepEqual(util.arrayify(["foo", "bar"]), ["foo", "bar"]);
|
||||
|
||||
assert.throws(function () {
|
||||
util.arrayify({});
|
||||
}, /illegal type for arrayify/);
|
||||
assert.deepEqual(util.arrayify({ foo: "bar" }), [{ foo: "bar" }]);
|
||||
});
|
||||
|
||||
test("regexify", function () {
|
||||
|
||||
Reference in New Issue
Block a user