Skip to content

Commit

Permalink
Merge pull request #851 from willrowe/hotfix/render-file-error-handling
Browse files Browse the repository at this point in the history
Add test to confirm `renderFile` error handling
  • Loading branch information
willrowe authored Jan 4, 2023
2 parents 7c33aa0 + 29f10f1 commit fd723d3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/test.exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,11 @@ describe('Twig.js Exports __express ->', function () {
});
});
});

describe('renderFile', function () {
it('should allow error handling on missing paths', function () {
Twig.renderFile('this/path/does/not/exist.twig', undefined, function (err, html) {
console.log(err, html);
});
});
});

0 comments on commit fd723d3

Please sign in to comment.