This commit is contained in:
Tony Brix 2018-04-05 00:00:08 -05:00
parent e0fd00bec4
commit 25c456a5e7
2 changed files with 11 additions and 10 deletions

View File

@ -41,6 +41,7 @@ function main(argv, callback) {
options = {},
input,
output,
string,
arg,
tokens,
opt;

View File

@ -7,15 +7,15 @@ it('should run the test', function () {
});
describe('Test heading ID functionality', function() {
it('should add id attribute by default', function() {
var renderer = new marked.Renderer(marked.defaults);
var header = renderer.heading('test', 1, 'test');
expect(header).toBe('<h1 id="test">test</h1>\n');
});
it('should add id attribute by default', function() {
var renderer = new marked.Renderer(marked.defaults);
var header = renderer.heading('test', 1, 'test');
expect(header).toBe('<h1 id="test">test</h1>\n');
});
it('should NOT add id attribute when options set false', function() {
var renderer = new marked.Renderer({ headerIds: false });
var header = renderer.heading('test', 1, 'test');
expect(header).toBe('<h1>test</h1>\n');
});
it('should NOT add id attribute when options set false', function() {
var renderer = new marked.Renderer({ headerIds: false });
var header = renderer.heading('test', 1, 'test');
expect(header).toBe('<h1>test</h1>\n');
});
});