Skip to content

Commit

Permalink
chore: enable twig re-throw errors method
Browse files Browse the repository at this point in the history
  • Loading branch information
williamdes committed Sep 4, 2022
1 parent 5f1a3e0 commit 317ded3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ module.exports = {
links: links,
owner: owner,
repo: repo,
settings: { 'twig options': { rethrow: true } },
},
(err, html) => {
if (err) {
Expand Down
15 changes: 6 additions & 9 deletions test/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ module.exports = function () {
}
);
});
/*test('test command custom template with error in template file', function(done) {
test('test command custom template with error in template file', function (done) {
const templateFile = __dirname + '/../src/CHANGELOG_error.twig';
exec(
pathBin +
Expand All @@ -131,15 +131,12 @@ module.exports = function () {
'HEAD' +
'/../CHANGELOG.twig',
(err, stdout, stderr) => {
if (err) {
done(err);
} else {
expect(stderr).to.contain('TwigException: errorhere function does not exist and is not defined in the context');
expect(stdout).to.equal('');
done();
}
expect(stderr).to.contain('errorhere function does not exist and is not defined in the context');
expect(stderr).to.contain('src/CHANGELOG_error.twig');
expect(stdout).to.equal('');
done();
}
);
});*/
});
});
};

0 comments on commit 317ded3

Please sign in to comment.