mirror of https://github.com/status-im/web3.js.git
23 lines
615 B
JavaScript
23 lines
615 B
JavaScript
|
var chai = require('chai');
|
||
|
var utils = require('../lib/utils');
|
||
|
var assert = chai.assert;
|
||
|
|
||
|
var tests = [
|
||
|
{ value: function () {}, is: false},
|
||
|
{ value: new Function(), is: false},
|
||
|
{ value: 'function', is: true},
|
||
|
{ value: {}, is: false},
|
||
|
{ value: new String('hello'), is: true}
|
||
|
];
|
||
|
|
||
|
describe('utils', function () {
|
||
|
describe('isString', function () {
|
||
|
tests.forEach(function (test) {
|
||
|
it('shoud test if value ' + test.func + ' is string: ' + test.is, function () {
|
||
|
assert.equal(utils.isString(test.value), test.is);
|
||
|
});
|
||
|
});
|
||
|
});
|
||
|
});
|
||
|
|