Skip to content
This repository has been archived by the owner on Apr 11, 2018. It is now read-only.

Commit

Permalink
adding test case and linking
Browse files Browse the repository at this point in the history
  • Loading branch information
bohnman committed Oct 9, 2013
1 parent 22d887a commit dc8e49d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/swig.js
Expand Up @@ -636,7 +636,6 @@ exports.Swig = function (opts) {
cb(err);
return;
}

var compiled;

try {
Expand Down
8 changes: 8 additions & 0 deletions tests/basic.test.js
Expand Up @@ -187,6 +187,14 @@ describe('swig.compileFile', function () {
}));
});
});

it('can use callback with errors', function (done) {
var errorTest = __dirname + '/cases-error/extends-non-existent.test.html';
expect(swig.compileFile(errorTest, {}, function (err) {
expect(err.errno).to.equal(34);
done();
}));
});
});

describe('swig.renderFile', function () {
Expand Down
1 change: 1 addition & 0 deletions tests/cases-error/extends-non-existent.test.html
@@ -0,0 +1 @@
{% extends 'does-not-exist.html' %}

0 comments on commit dc8e49d

Please sign in to comment.