Skip to content

Commit

Permalink
Add test to reproduce the bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cybercase committed Jun 7, 2015
1 parent 86353c1 commit da598d6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/node/Container/testMakeHtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,26 @@
});
});

describe('Converter.options extensions', function () {
showdown.extensions.testext = function () {
return [{
type: 'output',
filter: function (text) {
runCount = runCount + 1;
return text;
}
}];
};
var runCount,
converter = new showdown.Converter({extensions: ['testext']});

it('output extensions should run once', function () {
runCount = 0;
converter.makeHtml('# testext');
runCount.should.equal(1);
});
});

function filter() {
return function (file) {
var ext = file.slice(-3);
Expand Down

0 comments on commit da598d6

Please sign in to comment.