MCPcopy
hub / github.com/jquery/jquery / match

Function match

test/data/testinit.js:54–58  ·  view source on GitHub ↗

* Asserts that a select matches the given IDs * @param {String} message - Assertion name * @param {String} selector - jQuery selector * @param {String} expectedIds - Array of ids to construct what is expected * @param {(String|Node)=document} context - Selector context * @example match("Check f

( message, selector, expectedIds, context, assert )

Source from the content-addressed store, hash-verified

52 * @example match("Check for something", "p", ["foo", "bar"]);
53 */
54function match( message, selector, expectedIds, context, assert ) {
55 var elems = jQuery( selector, context ).get();
56
57 assert.deepEqual( elems, q.apply( q, expectedIds ), message + " (" + selector + ")" );
58}
59
60/**
61 * Asserts that a select matches the given IDs.

Callers 1

testinit.jsFile · 0.85

Calls 1

jQueryFunction · 0.70

Tested by

no test coverage detected