Permalink
Browse files

test instantiating with varargs

  • Loading branch information...
1 parent f7c6601 commit 74b4dd20a10cc46200de8b06b4146c4cccd6ab6b @jneen committed Feb 14, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 test/p.test.js
View
@@ -35,6 +35,7 @@ describe('P', function() {
it('is called when the class is called plainly', function() {
assert.ok(MyClass().initCalled);
assert.equal(3, MyClass(1,2,3).initArgs[2]);
+ assert.equal(2, MyClass.apply(null, [1, 2, 3]).initArgs[1]);
});
it('is not called when the new keyword is given', function() {

0 comments on commit 74b4dd2

Please sign in to comment.