Skip to content

Commit

Permalink
🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeyens committed Sep 18, 2023
1 parent 0137b33 commit 6f27879
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/components/Plate.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,21 +139,21 @@ describe('Plate', () => {
const _plugins = [{ key: 'test1' }];

const wrapper = ({ children, id }: any) => (
<Plate id={id} plugins={id === 1 ? _plugins : undefined}>
<Plate id={id} plugins={id === '1' ? _plugins : undefined}>
{children}
</Plate>
);
const { result, rerender } = renderHook(
({ id }) => usePlateSelectors(id).plugins(),
{
wrapper,
initialProps: { id: 1 },
initialProps: { id: '1' },
}
);

expect(result.current.at(-1)!.key).toBe('test1');

rerender({ id: 2 });
rerender({ id: '2' });

expect(result.current.at(-1)!.key).not.toBe('test1');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export const plugins = createPlugins(
options: { enableScroller: true },
}),
createEmojiPlugin({
renderAfterEditable: EmojiCombobox,
renderAfterEditable: EmojiCombobox as RenderAfterEditable,
}),
createExitBreakPlugin({
options: {
Expand Down

0 comments on commit 6f27879

Please sign in to comment.