Update splice tests to test added behavior

This commit is contained in:
Scott Kyle 2016-03-17 14:53:42 -07:00
parent 933326c410
commit 9ba477762a

View File

@ -344,6 +344,14 @@ module.exports = BaseTest.extend({
TestCase.assertEqual(removed.length, 0);
TestCase.assertEqual(array.length, 1);
removed = array.splice(1);
TestCase.assertEqual(removed.length, 0);
TestCase.assertEqual(array.length, 1);
removed = array.splice(0);
TestCase.assertEqual(removed.length, 1);
TestCase.assertEqual(array.length, 0);
TestCase.assertThrows(function() {
array.splice('cat', 1);
});