global.stub_out_jquery(); set_global('page_params', { development: true, }); const { JSDOM } = require("jsdom"); const { window } = new JSDOM('
Hello world
'); const { document } = window; global.document = document; global.$ = require('jquery')(window); zrequire('toMarkdown', 'node_modules/to-markdown/dist/to-markdown.js'); var copy_and_paste = zrequire('copy_and_paste'); run_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 = '
Test List: