From 19401280aed9d4767faddcf58fab91ec13c556a9 Mon Sep 17 00:00:00 2001 From: Di Peng Date: Sat, 20 Aug 2011 08:51:00 -0700 Subject: feat(doc): generate both normal and debug version of index.html - index.html has manifest file and angular.min.js - index-jq.html has manifest file, angular.min.js and jquery.min.js - index-debug.html has angular.js - index-jq-debug.html has angular.js and jquery.min.js --- docs/spec/writerSpec.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'docs/spec') diff --git a/docs/spec/writerSpec.js b/docs/spec/writerSpec.js index 8354ad5d..a44e283c 100644 --- a/docs/spec/writerSpec.js +++ b/docs/spec/writerSpec.js @@ -15,4 +15,20 @@ describe('writer', function(){ expect(toString(['abc',{}])).toEqual('abc{}'); }); }); + + describe('replace method', function() { + var content, + replacements; + + beforeEach(function() { + content = 'angular super jQuery manifest'; + }); + + it('should replace placeholders', function() { + replacements = {'angular': 'ng', 'jQuery': 'jqlite','notHere': 'here'}; + + content = writer.replace(content, replacements); + expect(content).toBe('ng super jqlite manifest'); + }); + }); }); -- cgit v1.2.3