]>
git.r.bdr.sh - rbdr/dotfiles/blob - atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/test/array/#/splice/shim.js
2c751e672400e6165795d048b1288c9fe97982d6
3 var SubArray
= require('../../../../array/_sub-array-dummy-safe');
5 module
.exports = function (t
, a
) {
6 var arr
, x
= {}, subArr
, result
;
8 arr
= ['foo', undefined, 0, '2d', false, x
, null];
10 a
.deep(t
.call(arr
, 2, 2, 'bar'), [0, '2d'], "Plain array: result");
11 a
.deep(arr
, ["foo", undefined, "bar", false, x
, null], "Plain array: change");
13 subArr
= new SubArray('foo', undefined, 0, '2d', false, x
, null);
15 result
= t
.call(subArr
, 2, 2, 'bar');
16 a(result
instanceof SubArray
, true, "Instance of subclass");
17 a
.deep(result
, [0, '2d'], "Subclass: result");
18 a
.deep(subArr
, ["foo", undefined, "bar", false, x
, null], "Subclass: change");