Skip to content

Commit cfc913f

Browse files
committed
Adding test case for function arguments
1 parent 54de489 commit cfc913f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/jquery.json.test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,17 @@ test( 'Dates', function(){
137137
);
138138

139139
});
140+
141+
test( 'Function arguments object', function(){
142+
143+
function argTest( one, two, three ) {
144+
equalJSON(
145+
arguments,
146+
'{"0":"foo","1":"bar","2":"baz"}',
147+
'arguments, as instance of Arguments, should be treated as an object'
148+
);
149+
}
150+
151+
argTest( 'foo', 'bar', 'baz' );
152+
153+
})

0 commit comments

Comments
 (0)