]> git.r.bdr.sh - rbdr/dotfiles/blob
42918b59711e32f45a0b743e86ba8b30112eeb97
[rbdr/dotfiles] /
1 'use strict';
2
3 module.exports = function (t, a) {
4 var x = [], y = {}, z = {};
5 a.deep(t.call(x, y), [], "Empty");
6 a.not(t.call(x), x, "Returns copy");
7 a.deep(t.call([1], y), [1], "One");
8 a.deep(t.call([1, 'raz'], y), [1, y, 'raz'], "One");
9 a.deep(t.call([1, 'raz', x], y), [1, y, 'raz', y, x], "More");
10 x = new Array(1000);
11 x[23] = 2;
12 x[3453] = 'raz';
13 x[500] = z;
14 a.deep(t.call(x, y), [2, y, z, y, 'raz'], "Sparse");
15 };