aboutsummaryrefslogblamecommitdiffstats
path: root/utils.isString.js
blob: 73b95d22b871f5aedf14e70e87cd69a7e73005d8 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                             
                                         








                                                                                           
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);
            });
        });   
    });
});