Skip to content
This repository has been archived by the owner on Oct 21, 2019. It is now read-only.

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahDragon authored May 18, 2017
1 parent c26e953 commit 8429b46
Showing 1 changed file with 30 additions and 5 deletions.
35 changes: 30 additions & 5 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
var should = require('chai').should(); // eslint-disable-line

describe('hexo-renderer-jade', function() {
var r = require('../lib/renderer');
var jade = require('../lib/jade');
var pug = require('../lib/pug');

it('default', function() {
var result = r({
// Jade test cases
it('jade - default', function() {
var result = jade({
text: 'p Hello #{name}'
}, {
name: 'Hexo'
Expand All @@ -15,8 +17,31 @@ describe('hexo-renderer-jade', function() {
result.should.eql('<p>Hello Hexo</p>');
});

it('compile', function() {
var render = r.compile({
it('jade - compile', function() {
var render = jade.compile({
text: 'p Hello #{name}'
});

var result = render({
name: 'Hexo'
});

result.should.eql('<p>Hello Hexo</p>');
});

// Pug test cases
it('pug - default', function() {
var result = pug({
text: 'p Hello #{name}'
}, {
name: 'Hexo'
});

result.should.eql('<p>Hello Hexo</p>');
});

it('pug - compile', function() {
var render = pug.compile({
text: 'p Hello #{name}'
});

Expand Down

0 comments on commit 8429b46

Please sign in to comment.