aboutsummaryrefslogtreecommitdiffstats
path: root/docs/spec/writerSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'docs/spec/writerSpec.js')
-rw-r--r--docs/spec/writerSpec.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/spec/writerSpec.js b/docs/spec/writerSpec.js
new file mode 100644
index 00000000..1a722ca6
--- /dev/null
+++ b/docs/spec/writerSpec.js
@@ -0,0 +1,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{}');
+ });
+ });
+}); \ No newline at end of file