]> 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/#/slice/shim.js
f674f3470037f7d1b0a45d31ad0520dad6361eab
[rbdr/dotfiles] / atom / packages / vim-mode / node_modules / grim / node_modules / emissary / node_modules / es6-weak-map / node_modules / es5-ext / test / array / # / slice / shim.js
1 'use strict';
2
3 var SubArray = require('../../../../array/_sub-array-dummy-safe');
4
5 module.exports = function (t, a) {
6 var arr, x = {}, subArr, result;
7
8 arr = ['foo', undefined, 0, '2d', false, x, null];
9
10 a.deep(t.call(arr, 2, 4), [0, '2d'], "Plain array: result");
11
12 subArr = new SubArray('foo', undefined, 0, '2d', false, x, null);
13
14 result = t.call(subArr, 2, 4);
15 a(result instanceof SubArray, true, "Instance of subclass");
16 a.deep(result, [0, '2d'], "Subclass: result");
17 };