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

Adding Array.prototype#fill tests

parent 33c8399d
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#fill
* @author Hank Yates (hankyates@gmail.com)
*/
runTestCase(function () {
var testArr = new Array('testString', 'anotherTestString', 3),
updatedArr = testArr.fill('newValue', 1, 3);
if (updatedArr[3] !== 'newValue') {
return false;
}
if (updatedArr[2] !== 'newValue') {
return false;
}
if (updatedArr[0] !== 'testString') {
return false;
}
if (updatedArr.length !== 4) {
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