global.stub_out_jquery(); var jsdom = require("jsdom"); global.document = jsdom.jsdom('
Hello world
'); var window = jsdom.jsdom().defaultView; global.$ = require('jquery')(window); zrequire('toMarkdown', 'node_modules/to-markdown/dist/to-markdown.js'); var copy_and_paste = zrequire('copy_and_paste'); (function test_paste_handler() { var input = ' love the Zulip Organization.'; assert.equal(copy_and_paste.paste_handler_converter(input), 'love the **Zulip****Organization**.'); input = 'TheJSDOM
constructor';
assert.equal(copy_and_paste.paste_handler_converter(input),
'The `JSDOM` constructor');
input = 'https://zulip.readthedocs.io/en/latest/subsystems/logging.html';
assert.equal(copy_and_paste.paste_handler_converter(input),
'https://zulip.readthedocs.io/en/latest/subsystems/logging.html');
input = 'Contributing to Zulip';
assert.equal(copy_and_paste.paste_handler_converter(input),
'[Contributing to Zulip](https://zulip.readthedocs.io/en/latest/overview/contributing.html)');
input = '1. text';
assert.equal(copy_and_paste.paste_handler_converter(input),
'1. text');
input = '