Commit 77e039c8 authored by Björn Bartels's avatar Björn Bartels 👩🏻
Browse files

PATLAB-7 update helper, config and templating tests

parent d7ce4d84
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
<html>
  <body>
    <div class="code-example"><pre><code class="html"><span class="hljs-tag">&lt;<span class="hljs-name">section</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"galaxy"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"planet"</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">h1</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"earth"</span>&gt;</span>
                some markup...
            <span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"sun"</span>&gt;</span>
            more markup...
        <span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">section</span>&gt;</span>
    </code></pre></div>  </body>
</html>
+4 −0
Original line number Diff line number Diff line
{
    "patterns": {},
    "categories": []
}
+5 −0
Original line number Diff line number Diff line
<html>
  <body>
    {{> body}}
  </body>
</html>
+12 −0
Original line number Diff line number Diff line
{{#code}}
<section class="galaxy">
    <div class="planet">
        <h1 id="earth">
            some markup...
        </h1>
    </div>
    <span id="sun">
        more markup...
    </span>
</section>
{{/code}}
+13 −0
Original line number Diff line number Diff line
@@ -227,5 +227,18 @@ describe('Patternlibrary instanciation and configuration:', function() {
		
	});
	
	describe('Patternlibrary.reset()', function() {
		it('should clear all pattern-, category- and user data', function () {
	        var p = new Patternlibrary.Patternlibrary();
	        p.data.someKey = 'some value';
	        p.reset();
			expect(p.data).not.to.have.a.key('someKey');
			expect(p.data.patterns).to.be.a('object');
			expect(p.data.categories).to.be.a('object');
			expect(Object.keys(p.data.patterns).length).to.equal(0);
			expect(Object.keys(p.data.categories).length).to.equal(0);
		});
	});
	

});
Loading