* Assert that ``expected`` is an array and ``actual`` is one of the members. * This is implemented using ``indexOf``, so doesn't handle NaN or ±0 correctly. * * @param {Any} actual - Test value. * @param {Array} expected - An array that ``actual`` is expected to * be a membe
(actual, expected, description)
| 1628 | * @param {string} [description] - Description of the condition being tested. |
| 1629 | */ |
| 1630 | function assert_in_array(actual, expected, description) |
| 1631 | { |
| 1632 | assert(expected.indexOf(actual) != -1, "assert_in_array", description, |
| 1633 | "value ${actual} not in array ${expected}", |
| 1634 | {actual:actual, expected:expected}); |
| 1635 | } |
| 1636 | expose_assert(assert_in_array, "assert_in_array"); |
| 1637 | |
| 1638 | // This function was deprecated in July of 2015. |
no test coverage detected
searching dependent graphs…