test/assertExtras.js
/**
 * Return true if every element in the expected array also exists in the the actual
 * array. The actual array may contain more elements that are not in the expected
 * array. This implementation is very simple and not very efficient (Order(n^2)) so
 * do not call this to compare large arrays.
 *
 * @param {Array.<Object>} actual The actual array to test
 * @param {Array.<Object>} expected The array to test against
 * @returns True if every element of the expected array exists in the actual array.
 */
Return true if every element in the expected array also exists in the the actual
array. The actual array may contain more elements that are not in the expected
array. This implementation is very simple and not very efficient (Order(n^2)) so
do not call this to compare large arrays.

@param {Array.} actual The actual array to test
@param {Array.} expected The array to test against
@returns True if every element of the expected array exists in the actual array.
Return true if every element in the expected array also exists in the the actual array . The actual array may contain more elements that are not in the expected array . This implementation is very simple and not very efficient ( Order ( n^2 )) so do not call this to compare large arrays . @param { Array . } actual The actual array to test @param { Array . } expected The array to test against @returns True if every element of the expected array exists in the actual array .
function isEqualIgnoringOrder(actual, expected) {
    var found = false;
    for (var i = 0; i < expected.length; i++) {
        var found = false;
        for (var j = 0; j < actual.length; j++) {
            try {
                if (_deepEqual(actual[j], expected[i])) {
                    found = true;
                    break;
                }
            } catch (ignored) {
            }
        }
        if (!found) {
            return false;
        }
    }
    return true;
}
function isEqualIgnoringOrder ( actual , expected ) { var found = false ; for ( var i = 0 ; i < expected . length ; i ++ ) { var found = false ; for ( var j = 0 ; j < actual . length ; j ++ ) { try { if ( _deepEqual ( actual [ j ] , expected [ i ] ) ) { found = true ; break ; } } catch ( ignored ) { } } if ( ! found ) { return false ; } } return true ; }
Return true if every element in the expected array also exists in the the actual
 array.
Return true if every element in the expected array also exists in the the actual array .