aboutsummaryrefslogtreecommitdiffstats
path: root/docs/spec/writerSpec.js
diff options
context:
space:
mode:
authorMisko Hevery2010-12-23 00:44:27 +0100
committerMisko Hevery2011-01-10 11:50:11 -0800
commit4f22d6866c052fb5b770ce4f377cecacacd9e6d8 (patch)
tree6bdb1c5eb70cfd7e6bcf143c121c53025a0489a4 /docs/spec/writerSpec.js
parentaab3df7aeaf79908e8b6212288b283adb42b1ce6 (diff)
downloadangular.js-4f22d6866c052fb5b770ce4f377cecacacd9e6d8.tar.bz2
complete rewrite of documentation generation
- romeved mustache.js - unified templates - improved testability of the code
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