1 | ;
|
2 |
|
3 | var isString = require('../src/string'),
|
4 | assert = require('chai').assert;
|
5 |
|
6 | describe('string', function() {
|
7 | var OBJECT_WITH_TO_STRING = {
|
8 | toString: function() {
|
9 | return 'nope';
|
10 | }
|
11 | };
|
12 | it('checks whether the value is a string', function() {
|
13 | assert.ok(isString(''));
|
14 | assert.ok(isString('test'));
|
15 | assert.ok(isString(new String('test')));
|
16 | assert.ok(!isString(OBJECT_WITH_TO_STRING));
|
17 | });
|
18 | });
|