1 | var fs = require('fs');
|
2 | var path = require('path');
|
3 | var assert = require('assert');
|
4 | var parseMarkdown = require('../../src/parse/markdown').parseMarkdown;
|
5 | var dom = require('../../src/parse/dom')
|
6 |
|
7 | describe('parseMarkdown', function(){
|
8 | it('hashHandleTest', function(){
|
9 | let html = parseMarkdown(path.resolve(__dirname, './fixtures/markdown.md'), 'utf8');
|
10 | let $ = dom.parse(html);
|
11 | assert.equal($('a').attr('href'), 'a.md#a-1')
|
12 | assert.equal($('a').text(), 'url')
|
13 | })
|
14 | })
|
15 |
|