Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Tests for panels
  • Loading branch information
rajasegar committed Apr 24, 2017
1 parent d2fc3a7 commit 04ae963
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
3 changes: 3 additions & 0 deletions test/fixtures/panels/default-panel.pug
@@ -0,0 +1,3 @@
include ../../../components/panels
+panel-default("Default Panel")
| Default Panel
3 changes: 3 additions & 0 deletions test/fixtures/panels/simple-panel.pug
@@ -0,0 +1,3 @@
include ../../../components/panels
+panel("default")
| Simple panel
19 changes: 16 additions & 3 deletions test/panels.js
Expand Up @@ -5,9 +5,22 @@ const path = require("path");

describe("Panels",function() {

it("should generate a panel", function(){
const fn = pug.compileFile(path.join(__dirname, "fixtures/panels","panel.pug"));
assert.equal(1,1);
it("should generate a simple panel without title", function(){
const fn = pug.compileFile(path.join(__dirname, "fixtures/panels","simple-panel.pug"));
let locals = {
type: "default"
};

let markup = `<div class="panel panel-${locals.type}"><div class="panel-body">Simple panel</div></div>`;
assert.equal(markup,fn(locals));
});

it("should generate a default panel", function() {
const fn = pug.compileFile(path.join(__dirname, "fixtures/panels", "default-panel.pug"));
let locals = {
title: "Default Panel"
};
let markup = `<div class="panel panel-default"><div `
});

});

0 comments on commit 04ae963

Please sign in to comment.