]> git.r.bdr.sh - rbdr/dotfiles/blob
4aebad64b44e519eec7d7ee205d82a940104098a
[rbdr/dotfiles] /
1 'use strict';
2
3 module.exports = function (t, a) {
4 var x;
5 a(t.call([]), null, "Empty");
6 a(t.call([null]), 0, "One value");
7 a(t.call([1, 2, 3]), 0, "Many values");
8 a(t.call(new Array(1000)), null, "Sparse empty");
9 x = [];
10 x[883] = undefined;
11 x[890] = null;
12 a(t.call(x), 883, "Manual sparse, distant value");
13 x = new Array(1000);
14 x[657] = undefined;
15 x[700] = null;
16 a(t.call(x), 657, "Sparse, distant value");
17 };