showdown/test/unit/showdown.Converter.makeMarkdown.js
Estevao Soares dos Santos c3411a567d fix(cli): cli now works properly
The CLI was completely rewrote. Changed dependency from yargs to
commanderjs,
which is cleaner, faster and has no dependencies.
Also added a complete testsuite for the cli.

Merged branch 'cli_refactor' into develop

Closes #893, #894
2022-03-03 12:48:23 +00:00

26 lines
680 B
JavaScript

/**
* Created by Estevao on 15-01-2015.
*/
describe('showdown.Converter', function () {
'use strict';
require('source-map-support').install();
require('chai').should();
var jsdom = require('jsdom'),
document = new jsdom.JSDOM('', {}).window.document, // jshint ignore:line
showdown = require('../../.build/showdown.js');
describe('makeMarkdown()', function () {
var converter = new showdown.Converter();
it('should parse a simple html string', function () {
var html = '<a href="/somefoo.html">a link</a>\n';
var md = '[a link](</somefoo.html>)';
converter.makeMarkdown(html, document).should.equal(md);
});
});
});