Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records committed Aug 22, 2020
1 parent a0b11b5 commit 9b9d2c9
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions test/unit/render.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,41 @@ describe('render', function() {
</h6>`
);
});

it('ignore', async function() {
const { docsify } = await init();
const output = docsify.compiler.compile('## h2 tag {docsify-ignore}');
expectSameDom(
output,
`
<h2 id="h2-tag">
<a href="#/?id=h2-tag" data-id="h2-tag" class="anchor">
<span>h2 tag </span>
</a>
</h2>`
);
});

it('ignore-all', async function() {
const { docsify } = await init();
const output = docsify.compiler.compile(
`# h1 tag {docsify-ignore-all}` + `\n## h2 tag`
);
expectSameDom(
output,
`
<h1 id="h1-tag">
<a href="#/?id=h1-tag" data-id="h1-tag" class="anchor">
<span>h1 tag </span>
</a>
</h1>
<h2 id="h2-tag">
<a href="#/?id=h2-tag" data-id="h2-tag" class="anchor">
<span>h2 tag</span>
</a>
</h2>`
);
});
});

describe('link', function() {
Expand Down

0 comments on commit 9b9d2c9

Please sign in to comment.