How to use jest-remirror - 1 common examples

To help you get started, we’ve selected a few jest-remirror examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ifiokjr / remirror / @remirror / extension-enhanced-link / src / __tests__ / enhanced-link.spec.tsx View on Github external
type: 'doc',
    content: [
      // { type: 'paragraph', content: [{ type: 'text', text: 'Woah' }] },
      {
        type: 'paragraph',
        content: [
          {
            type: 'text',
            marks: [{ type: 'enhancedLink', attrs: { href: 'http://Random.com' } }],
            text: 'Random.com',
          },
        ],
      },
    ],
  };
  const string = renderSSREditor([new EnhancedLinkExtension({})], {
    initialContent,
    forceEnvironment: 'ssr',
  });
  expect(string).toInclude('http://Random.com');
  expect(string).toMatchInlineSnapshot(`
    <div class="css-1u8qly9">
      <div class="Prosemirror remirror-editor" aria-label="" aria-multiline="true" role="textbox">
        <p>
          <a role="presentation" href="http://Random.com"></a></p></div></div>

jest-remirror

A text editor for react built with prosemirror

MIT
Latest version published 5 months ago

Package Health Score

79 / 100
Full package analysis

Popular jest-remirror functions