How to use the jest-prosemirror.atomContainer function in jest-prosemirror

To help you get started, we’ve selected a few jest-prosemirror 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 / core-utils / src / __tests__ / prosemirror-utils.spec.ts View on Github external
it('supports leaf nodes with with nested inline atom nodes', () => {
    const node = atomContainer(atomBlock());
    const {
      state: { selection },
    } = createEditor(doc(p('abcd'), atomContainer(atomBlock()), ''));
    const position = findPositionOfNodeBefore(selection);
    expect(position).toEqual({ pos: 6, start: 7, end: 9, node });
  });
});
github ifiokjr / remirror / @remirror / core-utils / src / __tests__ / prosemirror-utils.spec.ts View on Github external
it('supports leaf nodes with with nested inline atom nodes', () => {
    const node = atomContainer(atomBlock());
    const {
      state: { selection },
    } = createEditor(doc(p('abcd'), atomContainer(atomBlock()), ''));
    const position = findPositionOfNodeBefore(selection);
    expect(position).toEqual({ pos: 6, start: 7, end: 9, node });
  });
});