]> git.r.bdr.sh - rbdr/dotfiles/blob
bbfefe8e333dc85c59f89ea52ff52c0060056e85
[rbdr/dotfiles] /
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, Boolean), [true, false, false, true, false, true, false],
11 "Plain array");
12
13 subArr = new SubArray('foo', undefined, 0, '2d', false, x, null);
14
15 result = t.call(subArr, Boolean);
16 a(result instanceof SubArray, true, "Instance of subclass");
17 a.deep(result, [true, false, false, true, false, true, false],
18 "Result of subclass");
19 };