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.
22 lines
634 B
22 lines
634 B
var chai = require('chai');
|
|
var utils = require('../lib/utils/utils.js');
|
|
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('lib/utils/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);
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
|