How to use the @remirror/core-extensions.baseExtensions.find function in @remirror/core-extensions

To help you get started, we’ve selected a few @remirror/core-extensions 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 / react / src / components / __tests__ / remirror-manager.spec.tsx View on Github external
test('it supports overriding base extensions', () => {
  const originalParagraph = baseExtensions.find(({ extension: { name } }) => name === 'paragraph');

  const Component: FC = () => {
    const manager = useRemirrorManager();
    expect(manager.extensions).not.toContain([originalParagraph]);
    expect(
      manager.extensions.find(({ options }) => {
        return options.indentLevels && options.indentLevels[1] === 1;
      }),
    ).toBeTruthy();
    return null;
  };

  render(