Skip to content

Commit

Permalink
Add very simple test for precompile
Browse files Browse the repository at this point in the history
Related to #392
  • Loading branch information
SamyPesse committed Mar 10, 2015
1 parent ff075af commit ce18959
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/precompile.js
@@ -0,0 +1,22 @@
(function() {
'use strict';

var expect, precompile, precompileString;

if(typeof require !== 'undefined') {
expect = require('expect.js');
precompile = require('../src/precompile').precompile;
precompileString = require('../src/precompile').precompileString;
}
else {
expect = window.expect;
precompile = nunjucks.precompile;
precompileString = nunjucks.precompileString
}

describe('precompile', function() {
it('should return a string', function() {
expect(precompileString("{{ test }}", { name: "test.html" })).to.be.an('string');
});
});
})();

0 comments on commit ce18959

Please sign in to comment.