aboutsummaryrefslogtreecommitdiffstats
path: root/docs/spec/writerSpec.js
blob: 1a722ca62b5798bf41773fda50553c7d877e4377 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
var writer = require('writer.js');
describe('writer', function(){
  describe('toString', function(){
    var toString = writer.toString;
    
    it('should merge string', function(){
      expect(toString('abc')).toEqual('abc');
    });
    
    it('should merge obj', function(){
      expect(toString({a:1})).toEqual('{"a":1}');
    });
    
    it('should merge array', function(){
      expect(toString(['abc',{}])).toEqual('abc{}');
    });
  });
});