UNPKG

486 BJavaScriptView Raw
1var fs = require('fs');
2var path = require('path');
3var assert = require('assert');
4var parseMarkdown = require('../../src/parse/markdown').parseMarkdown;
5var dom = require('../../src/parse/dom')
6
7describe('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