var should = require('should'), // jshint ignore:line converter = require('../../../server/utils/mobiledoc-converter'); describe('Convert mobiledoc to HTML ', function () { var mobiledoc = { version: '0.3.1', atoms: [], cards: [ ['card-markdown', { pos: 'top', card_name: 'card-markdown', markdown: '#heading\n\n- list one\n- list two\n- list three' } ], ['card-html', { pos: 'top', card_name: 'card-html', html: '

HTML CARD

' }] ], markups: [], sections: [ [1, 'p', [ [0, [], 0, 'test'] ]], [10, 0], [10, 1] ] }; it('Converts a mobiledoc to HTML', function () { converter.render(mobiledoc).should.match('

test

heading

\n\n

HTML CARD

'); }); });