Fix tests

This commit is contained in:
Roman Hotsiy 2017-02-02 23:13:05 +02:00
parent 076fca15a4
commit a2d355a981
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -11,14 +11,14 @@ describe('Utils', () => {
it('should return a level-1 heading even though only level-2 is present', () => {
mdRender.renderMd('## Sub Intro');
Object.keys(mdRender.headings).length.should.be.equal(1);
should.exist(mdRender.headings['sub-intro']);
should.exist(mdRender.headings['Sub-Intro']);
});
it('should return a level-2 heading as a child of level-1', () => {
mdRender.renderMd('# Introduction \n ## Sub Intro');
Object.keys(mdRender.headings).length.should.be.equal(1);
should.exist(mdRender.headings['introduction']);
should.exist(mdRender.headings['introduction'].children);
Object.keys(mdRender.headings['introduction'].children).length.should.be.equal(1);
should.exist(mdRender.headings['Introduction']);
should.exist(mdRender.headings['Introduction'].children);
Object.keys(mdRender.headings['Introduction'].children).length.should.be.equal(1);
});
});
});