| OLD | NEW |
| 1 This test checks the behavior of the every() method on Array objects. | 1 This test checks the behavior of the every() method on Array objects. |
| 2 | 2 |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 4 | 4 |
| 5 | 5 |
| 6 1.0 Single Argument Testing | 6 1.0 Single Argument Testing |
| 7 PASS [12, 5, 8, 130, 44].every(isBigEnough) is false | 7 PASS [12, 5, 8, 130, 44].every(isBigEnough) is false |
| 8 PASS [12, 54, 18, 130, 44].every(isBigEnough) is true | 8 PASS [12, 54, 18, 130, 44].every(isBigEnough) is true |
| 9 | 9 |
| 10 2.0 Two Argument Testing | 10 2.0 Two Argument Testing |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 PASS [12, 5, 8, 130, 44].every(isBigEnoughAndPush) is false | 25 PASS [12, 5, 8, 130, 44].every(isBigEnoughAndPush) is false |
| 26 PASS [12, 54, 18, 130, 44].every(isBigEnoughAndPush) is false | 26 PASS [12, 54, 18, 130, 44].every(isBigEnoughAndPush) is false |
| 27 | 27 |
| 28 4.0 Exception Test | 28 4.0 Exception Test |
| 29 PASS [12, 5, 8, 130, 44].every(isBigEnoughAndException) threw exception exceptio
n from function. | 29 PASS [12, 5, 8, 130, 44].every(isBigEnoughAndException) threw exception exceptio
n from function. |
| 30 PASS [12, 54, 18, 130, 44].every(isBigEnoughAndException) threw exception except
ion from function. | 30 PASS [12, 54, 18, 130, 44].every(isBigEnoughAndException) threw exception except
ion from function. |
| 31 | 31 |
| 32 5.0 Wrong Type for Callback Test | 32 5.0 Wrong Type for Callback Test |
| 33 PASS [12, 5, 8, 130, 44].every(5) threw exception TypeError: 5 is not a function
. | 33 PASS [12, 5, 8, 130, 44].every(5) threw exception TypeError: 5 is not a function
. |
| 34 PASS [12, 5, 8, 130, 44].every('wrong') threw exception TypeError: wrong is not
a function. | 34 PASS [12, 5, 8, 130, 44].every('wrong') threw exception TypeError: wrong is not
a function. |
| 35 PASS [12, 5, 8, 130, 44].every(new Object()) threw exception TypeError: #<an Obj
ect> is not a function. | 35 PASS [12, 5, 8, 130, 44].every(new Object()) threw exception TypeError: #<Object
> is not a function. |
| 36 PASS [12, 5, 8, 130, 44].every(null) threw exception TypeError: null is not a fu
nction. | 36 PASS [12, 5, 8, 130, 44].every(null) threw exception TypeError: null is not a fu
nction. |
| 37 PASS [12, 5, 8, 130, 44].every(undefined) threw exception TypeError: undefined i
s not a function. | 37 PASS [12, 5, 8, 130, 44].every(undefined) threw exception TypeError: undefined i
s not a function. |
| 38 PASS [12, 5, 8, 130, 44].every() threw exception TypeError: undefined is not a f
unction. | 38 PASS [12, 5, 8, 130, 44].every() threw exception TypeError: undefined is not a f
unction. |
| 39 | 39 |
| 40 6.0 Early Exit ("Short Circuiting") | 40 6.0 Early Exit ("Short Circuiting") |
| 41 PASS [12, 5, 8, 130, 44].every(isBigEnoughShortCircuit) is false | 41 PASS [12, 5, 8, 130, 44].every(isBigEnoughShortCircuit) is false |
| 42 PASS accumulator.toString() is [12, 5].toString() | 42 PASS accumulator.toString() is [12, 5].toString() |
| 43 PASS [12, 54, 18, 130, 44].every(isBigEnoughShortCircuit) is true | 43 PASS [12, 54, 18, 130, 44].every(isBigEnoughShortCircuit) is true |
| 44 PASS accumulator.toString() is [12, 54, 18, 130, 44].toString() | 44 PASS accumulator.toString() is [12, 54, 18, 130, 44].toString() |
| 45 | 45 |
| 46 7.0 Behavior for Holes in Arrays | 46 7.0 Behavior for Holes in Arrays |
| 47 PASS arr.every(isNotUndefined) is true | 47 PASS arr.every(isNotUndefined) is true |
| 48 PASS arr.every(isNotUndefined) is true | 48 PASS arr.every(isNotUndefined) is true |
| 49 PASS successfullyParsed is true | 49 PASS successfullyParsed is true |
| 50 | 50 |
| 51 TEST COMPLETE | 51 TEST COMPLETE |
| 52 | 52 |
| OLD | NEW |