Skip to content
Snippets Groups Projects
Commit 9244107e authored by Hank Yates's avatar Hank Yates Committed by Brian Terlson
Browse files

Adding Array#of tests

parent e30c0b31
No related branches found
No related tags found
No related merge requests found
// Copyright (c) 2014 Hank Yates. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
//
/**
* @description Testing Array#of when passed Strings
* @author Hank Yates (hankyates@gmail.com)
*/
runTestCase(function () {
var testArr = Array.of('testString', 'anotherTestString');
if (testArr[0] !== 'testString') {
return false;
}
if (testArr[1] !== 'anotherTestString') {
return false;
}
return true;
});
// Copyright (c) 2014 Hank Yates. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* @description Testing Array#of when passed single argument
* @author Hank Yates (hankyates@gmail.com)
*/
runTestCase(function () {
var testArr = Array.of(3);
if (testArr.length !== 1) {
return false;
}
if (testArr[0] !== 3) {
return false;
}
return true;
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment