0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00
Files
homebrewery/tests/markdown/basic.test.js
Alexey Sachkov 28793e06fc Fix linter errors
2021-12-30 23:40:58 +03:00

16 lines
538 B
JavaScript

/* eslint-disable max-lines */
const Markdown = require('naturalcrit/markdown.js');
test('Escapes <script> tag', function() {
const source = '<script></script>';
const rendered = Markdown.render(source);
expect(rendered).toMatch('&lt;script&gt;&lt;/script&gt;');
});
test('Processes the markdown within an HTML block if its just a class wrapper', function() {
const source = '<div>*Bold text*</div>';
const rendered = Markdown.render(source);
expect(rendered).toBe('<div> <p><em>Bold text</em></p>\n </div>');
});