TAP version 13 # as a function # bad array/this value ok 1 undefined is not an object ok 2 null is not an object # simple examples ok 3 [1, 2, 3] includes 1 ok 4 [1, 2, 3] does not include 4 ok 5 [NaN] includes NaN # does not skip holes ok 6 Array(1) includes undefined # exceptions # fromIndex conversion ok 7 fromIndex conversion throws # ToLength ok 8 ToLength conversion throws # arraylike ok 9 sparse array-like object includes "a" ok 10 sparse array-like object does not include "c" ok 11 sparse array-like object includes "b" ok 12 sparse array-like object does not include "c" # fromIndex ok 13 NaN fromIndex -> 0 fromIndex ok 14 starting from 0 finds index 1 ok 15 starting from 1 finds index 1 ok 16 starting from 2 does not find index 1 # number coercion ok 17 does not find "a" with object fromIndex coercing to 2 ok 18 does not find "a" with string fromIndex coercing to 2 ok 19 finds "c" with object fromIndex coercing to 2 ok 20 finds "c" with string fromIndex coercing to 2 # fromIndex greater than length ok 21 array of length 1 is not searched if fromIndex is > 1 ok 22 array of length 1 is not searched if fromIndex is >= 1 ok 23 array of length 1 is not searched if fromIndex is 1.1 ok 24 array of length 1 is not searched if fromIndex is Infinity # negative fromIndex ok 25 computed length would be negative; fromIndex is thus 0 ok 26 computed length would be negative; fromIndex is thus 0 ok 27 computed length would be negative; fromIndex is thus 0 ok 28 finds -1st item with -1 fromIndex ok 29 does not find -2nd item with -1 fromIndex ok 30 finds -2nd item with -2 fromIndex ok 31 finds -4th item with -4 fromIndex ok 32 does not find -5th item with -4 fromIndex ok 33 finds -5th item with -5 fromIndex # strings ok 34 string includes one of its chars ok 35 string does not include a char it should not ok 36 boxed string includes one of its chars ok 37 boxed string does not include a char it should not # shimmed ok 38 Array#includes has a length of 1 # Function name ok 39 Array#includes has name "includes" # enumerability ok 40 Array#includes is not enumerable # bad array/this value ok 41 undefined is not an object ok 42 null is not an object # simple examples ok 43 [1, 2, 3] includes 1 ok 44 [1, 2, 3] does not include 4 ok 45 [NaN] includes NaN # does not skip holes ok 46 Array(1) includes undefined # exceptions # fromIndex conversion ok 47 fromIndex conversion throws # ToLength ok 48 ToLength conversion throws # arraylike ok 49 sparse array-like object includes "a" ok 50 sparse array-like object does not include "c" ok 51 sparse array-like object includes "b" ok 52 sparse array-like object does not include "c" # fromIndex ok 53 NaN fromIndex -> 0 fromIndex ok 54 starting from 0 finds index 1 ok 55 starting from 1 finds index 1 ok 56 starting from 2 does not find index 1 # number coercion ok 57 does not find "a" with object fromIndex coercing to 2 ok 58 does not find "a" with string fromIndex coercing to 2 ok 59 finds "c" with object fromIndex coercing to 2 ok 60 finds "c" with string fromIndex coercing to 2 # fromIndex greater than length ok 61 array of length 1 is not searched if fromIndex is > 1 ok 62 array of length 1 is not searched if fromIndex is >= 1 ok 63 array of length 1 is not searched if fromIndex is 1.1 ok 64 array of length 1 is not searched if fromIndex is Infinity # negative fromIndex ok 65 computed length would be negative; fromIndex is thus 0 ok 66 computed length would be negative; fromIndex is thus 0 ok 67 computed length would be negative; fromIndex is thus 0 ok 68 finds -1st item with -1 fromIndex ok 69 does not find -2nd item with -1 fromIndex ok 70 finds -2nd item with -2 fromIndex ok 71 finds -4th item with -4 fromIndex ok 72 does not find -5th item with -4 fromIndex ok 73 finds -5th item with -5 fromIndex # strings ok 74 string includes one of its chars ok 75 string does not include a char it should not ok 76 boxed string includes one of its chars ok 77 boxed string does not include a char it should not 1..77 # tests 77 # pass 77 # ok