Ariya Hidayat 2014-07-31 22:34:32 -07:00
parent bbdaa9e884
commit 3136898976
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
var assert = require('../../assert');
assert.typeOf(Function.length, 'number');
assert.typeOf(Function.prototype, 'function');
assert.typeOf(Function.prototype.apply, 'function');
assert.typeOf(Function.prototype.bind, 'function');
assert.typeOf(Function.prototype.call, 'function');
assert.typeOf(Function.prototype.name, 'string');
assert.typeOf(Function.prototype.toString, 'function');
var f = function foo(){};
assert.equal(f.name, 'foo');
assert.equal(Function.length, 1);
assert.equal(function(){}.length, 0);
assert.equal(function(x){}.length, 1);
assert.equal(function(x, y){}.length, 2);
assert.equal(function(x, y){}.length, 2);