mirror of
https://github.com/status-im/realm-js.git
synced 2025-02-17 09:06:26 +00:00
Update splice tests to test added behavior
This commit is contained in:
parent
933326c410
commit
9ba477762a
@ -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);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user