MCPcopy Index your code
hub / github.com/nodejs/node / assert_in_array

Function assert_in_array

test/fixtures/wpt/resources/testharness.js:1630–1635  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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.

Callers 5

idlharness.jsFile · 0.70
entry_checkFunction · 0.50
assert_goodCryptoKeyFunction · 0.50
entry_checkFunction · 0.50

Calls 2

assertFunction · 0.70
indexOfMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…