You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

44 lines
1.3 KiB

var chai = require('chai');
var assert = chai.assert;
var Method = require('../lib/web3/method');
var utils = require('../lib/utils/utils');
describe('lib/web3/method', function () {
describe('attachToObject', function () {
//it('attach simple function to an object', function () {
//// given
//var method = new Method({
//name: 'hello'
//});
//var object = {};
//var func = function () { return 1; };
//// when
//method.attachToObject(object, func);
//// then
//assert.equal(utils.isFunction(object.hello), true);
//assert.equal(object.hello(), 1);
//});
//it('attach nested function to an object', function () {
//// given
//var method = new Method({
//name: 'hello.world'
//});
//var object = {};
//var func = function () { return 1; };
//// when
//method.attachToObject(object, func);
//// then
//assert.equal(utils.isObject(object.hello), true);
//assert.equal(utils.isFunction(object.hello.world), true);
//assert.equal(object.hello.world(), 1);
//});
});
});