Tests: array_intersect_assoc version 48

Function:
Description: Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check.
Version:
Status: current
Date: 2012-04-19 05:44
Summary: Copying in test.
Programmer: jj5
Tests
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function array_intersect_assoc_tests() {

  // API reference: http://docs.jquery.com/QUnit
  module( "array_intersect_assoc" );

  test( "array_intersect_assoc", function() {

    var a1 = { 'a': 'green', 'b': 'brown', 'c': 'blue', 0: 'red' };
    var a2 = { 'a': 'green', 0: 'yellow', 1: 'red' };
    deepEqual( array_intersect_assoc( a1, a2 ), { 'a': 'green' } );

  } );

}
[top]

Comments

There are no comments yet, be the first!

Please Login or Register to post comments.