From 0835f0da254b328bf7c2a87caf33018033d28545 Mon Sep 17 00:00:00 2001 From: wnhlee <2wheeh@gmail.com> Date: Mon, 18 Mar 2024 14:51:50 +0900 Subject: [PATCH] update pathes for unit tests rebasing 0.14.1 --- jest.config.js | 11 ++++++++++- .../src/__tests__/unit/LexicalHistory.test.tsx | 10 +++++----- .../src/__tests__/unit/PlainRichTextPlugin.test.tsx | 4 ++-- packages/lexical-react/src/__tests__/unit/utils.tsx | 4 ++-- .../src/__tests__/unit/LexicalSelection.test.tsx | 10 +++++----- .../src/__tests__/unit/LexicalEventHelpers.test.tsx | 10 +++++----- .../lexical/src/__tests__/unit/LexicalEditor.test.tsx | 8 ++++---- .../src/__tests__/unit/LexicalListPlugin.test.tsx | 8 ++++---- packages/lexical/src/__tests__/utils/index.tsx | 4 ++-- 9 files changed, 39 insertions(+), 30 deletions(-) diff --git a/jest.config.js b/jest.config.js index 808142ca788..e107ab2ce66 100644 --- a/jest.config.js +++ b/jest.config.js @@ -49,6 +49,8 @@ module.exports = { '^@lexical/react/LexicalAutoEmbedPlugin$': '/packages/lexical-react/src/LexicalAutoEmbedPlugin.tsx', + '^@lexical/react/LexicalAutoFocusPlugin$': + '/packages/lexical-react/src/LexicalAutoFocusPlugin.ts', '^@lexical/react/LexicalAutoLinkPlugin$': '/packages/lexical-react/src/LexicalAutoLinkPlugin.ts', '^@lexical/react/LexicalCheckListPlugin$': @@ -57,21 +59,28 @@ module.exports = { '/packages/lexical-react/src/LexicalCollaborationContext.ts', '^@lexical/react/LexicalCollaborationPlugin$': '/packages/lexical-react/src/LexicalCollaborationPlugin.ts', + '^@lexical/react/LexicalComposer$': + '/packages/lexical-react/src/LexicalComposer.tsx', '^@lexical/react/LexicalComposerContext$': '/packages/lexical-react/src/LexicalComposerContext.ts', '^@lexical/react/LexicalContentEditable$': '/packages/lexical-react/src/LexicalContentEditable.tsx', + '^@lexical/react/LexicalErrorBoundary$': + '/packages/lexical-react/src/LexicalErrorBoundary.tsx', + '^@lexical/react/LexicalHistoryPlugin$': + '/packages/lexical-react/src/LexicalHistoryPlugin.ts', '^@lexical/react/LexicalLinkPlugin$': '/packages/lexical-react/src/LexicalLinkPlugin.ts', '^@lexical/react/LexicalListPlugin$': '/packages/lexical-react/src/LexicalListPlugin.ts', '^@lexical/react/LexicalPlainTextPlugin$': '/packages/lexical-react/src/LexicalPlainTextPlugin.ts', + '^@lexical/react/LexicalRichTextPlugin$': + '/packages/lexical-react/src/LexicalRichTextPlugin.tsx', '^@lexical/react/LexicalTabIndentationPlugin$': '/packages/lexical-react/src/LexicalTabIndentationPlugin.tsx', '^@lexical/react/LexicalTablePlugin$': '/packages/lexical-react/src/LexicalTablePlugin.ts', - '^@lexical/react/src/(.*)$': '/packages/lexical-react/src/$1', '^@lexical/react/useLexicalCanShowPlaceholder$': '/packages/lexical-react/src/useLexicalCanShowPlaceholder.ts', '^@lexical/react/useLexicalDecorators$': diff --git a/packages/lexical-history/src/__tests__/unit/LexicalHistory.test.tsx b/packages/lexical-history/src/__tests__/unit/LexicalHistory.test.tsx index f3d03ac0a6f..170a649e4bb 100644 --- a/packages/lexical-history/src/__tests__/unit/LexicalHistory.test.tsx +++ b/packages/lexical-history/src/__tests__/unit/LexicalHistory.test.tsx @@ -7,11 +7,11 @@ */ import {createEmptyHistoryState, registerHistory} from '@lexical/history'; -import {useLexicalComposerContext} from '@lexical/react/src/LexicalComposerContext'; -import {ContentEditable} from '@lexical/react/src/LexicalContentEditable'; -import LexicalErrorBoundary from '@lexical/react/src/LexicalErrorBoundary'; -import {HistoryPlugin} from '@lexical/react/src/LexicalHistoryPlugin'; -import {RichTextPlugin} from '@lexical/react/src/LexicalRichTextPlugin'; +import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; +import {ContentEditable} from '@lexical/react/LexicalContentEditable'; +import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary'; +import {HistoryPlugin} from '@lexical/react/LexicalHistoryPlugin'; +import {RichTextPlugin} from '@lexical/react/LexicalRichTextPlugin'; import {$createQuoteNode} from '@lexical/rich-text/src'; import {$setBlocksType} from '@lexical/selection/src'; import { diff --git a/packages/lexical-react/src/__tests__/unit/PlainRichTextPlugin.test.tsx b/packages/lexical-react/src/__tests__/unit/PlainRichTextPlugin.test.tsx index d91833a3666..b1878b14921 100644 --- a/packages/lexical-react/src/__tests__/unit/PlainRichTextPlugin.test.tsx +++ b/packages/lexical-react/src/__tests__/unit/PlainRichTextPlugin.test.tsx @@ -11,8 +11,8 @@ import {HashtagNode} from '@lexical/hashtag'; import {AutoLinkNode, LinkNode} from '@lexical/link'; import {ListItemNode, ListNode} from '@lexical/list'; import {OverflowNode} from '@lexical/overflow'; -import {useLexicalComposerContext} from '@lexical/react/src/LexicalComposerContext'; -import LexicalErrorBoundary from '@lexical/react/src/LexicalErrorBoundary'; +import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; +import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary'; import {HeadingNode, QuoteNode} from '@lexical/rich-text'; import {TableCellNode, TableNode, TableRowNode} from '@lexical/table'; import {$rootTextContent} from '@lexical/text'; diff --git a/packages/lexical-react/src/__tests__/unit/utils.tsx b/packages/lexical-react/src/__tests__/unit/utils.tsx index 783732d08d0..7ad79b4da1a 100644 --- a/packages/lexical-react/src/__tests__/unit/utils.tsx +++ b/packages/lexical-react/src/__tests__/unit/utils.tsx @@ -6,8 +6,6 @@ * */ -import {useLexicalComposerContext} from '@lexical/react/src/LexicalComposerContext'; -import LexicalErrorBoundary from '@lexical/react/src/LexicalErrorBoundary'; import {UserState} from '@lexical/yjs/src/index'; import {LexicalEditor} from 'lexical'; import * as React from 'react'; @@ -18,7 +16,9 @@ import * as Y from 'yjs'; import {useCollaborationContext} from '../../LexicalCollaborationContext'; import {CollaborationPlugin} from '../../LexicalCollaborationPlugin'; import {LexicalComposer} from '../../LexicalComposer'; +import {useLexicalComposerContext} from '../../LexicalComposerContext'; import {ContentEditable} from '../../LexicalContentEditable'; +import LexicalErrorBoundary from '../../LexicalErrorBoundary'; import {RichTextPlugin} from '../../LexicalRichTextPlugin'; function Editor({doc, provider, setEditor, awarenessData}) { diff --git a/packages/lexical-selection/src/__tests__/unit/LexicalSelection.test.tsx b/packages/lexical-selection/src/__tests__/unit/LexicalSelection.test.tsx index 7f0ebc63ef9..d48d1166297 100644 --- a/packages/lexical-selection/src/__tests__/unit/LexicalSelection.test.tsx +++ b/packages/lexical-selection/src/__tests__/unit/LexicalSelection.test.tsx @@ -8,11 +8,11 @@ import {$createLinkNode} from '@lexical/link'; import {$createListItemNode, $createListNode} from '@lexical/list'; -import {useLexicalComposerContext} from '@lexical/react/src/LexicalComposerContext'; -import {ContentEditable} from '@lexical/react/src/LexicalContentEditable'; -import LexicalErrorBoundary from '@lexical/react/src/LexicalErrorBoundary'; -import {HistoryPlugin} from '@lexical/react/src/LexicalHistoryPlugin'; -import {RichTextPlugin} from '@lexical/react/src/LexicalRichTextPlugin'; +import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; +import {ContentEditable} from '@lexical/react/LexicalContentEditable'; +import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary'; +import {HistoryPlugin} from '@lexical/react/LexicalHistoryPlugin'; +import {RichTextPlugin} from '@lexical/react/LexicalRichTextPlugin'; import {$createHeadingNode} from '@lexical/rich-text'; import { $addNodeStyle, diff --git a/packages/lexical-utils/src/__tests__/unit/LexicalEventHelpers.test.tsx b/packages/lexical-utils/src/__tests__/unit/LexicalEventHelpers.test.tsx index c1fe5cb4f9d..7434d0a0937 100644 --- a/packages/lexical-utils/src/__tests__/unit/LexicalEventHelpers.test.tsx +++ b/packages/lexical-utils/src/__tests__/unit/LexicalEventHelpers.test.tsx @@ -11,11 +11,11 @@ import {HashtagNode} from '@lexical/hashtag'; import {AutoLinkNode, LinkNode} from '@lexical/link'; import {ListItemNode, ListNode} from '@lexical/list'; import {OverflowNode} from '@lexical/overflow'; -import {AutoFocusPlugin} from '@lexical/react/src/LexicalAutoFocusPlugin'; -import {useLexicalComposerContext} from '@lexical/react/src/LexicalComposerContext'; -import {ContentEditable} from '@lexical/react/src/LexicalContentEditable'; -import LexicalErrorBoundary from '@lexical/react/src/LexicalErrorBoundary'; -import {RichTextPlugin} from '@lexical/react/src/LexicalRichTextPlugin'; +import {AutoFocusPlugin} from '@lexical/react/LexicalAutoFocusPlugin'; +import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; +import {ContentEditable} from '@lexical/react/LexicalContentEditable'; +import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary'; +import {RichTextPlugin} from '@lexical/react/LexicalRichTextPlugin'; import {HeadingNode, QuoteNode} from '@lexical/rich-text'; import { applySelectionInputs, diff --git a/packages/lexical/src/__tests__/unit/LexicalEditor.test.tsx b/packages/lexical/src/__tests__/unit/LexicalEditor.test.tsx index 98574f07b25..b5dc5a95b19 100644 --- a/packages/lexical/src/__tests__/unit/LexicalEditor.test.tsx +++ b/packages/lexical/src/__tests__/unit/LexicalEditor.test.tsx @@ -6,10 +6,10 @@ * */ -import {useLexicalComposerContext} from '@lexical/react/src/LexicalComposerContext'; -import {ContentEditable} from '@lexical/react/src/LexicalContentEditable'; -import LexicalErrorBoundary from '@lexical/react/src/LexicalErrorBoundary'; -import {RichTextPlugin} from '@lexical/react/src/LexicalRichTextPlugin'; +import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; +import {ContentEditable} from '@lexical/react/LexicalContentEditable'; +import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary'; +import {RichTextPlugin} from '@lexical/react/LexicalRichTextPlugin'; import { $createTableCellNode, $createTableNode, diff --git a/packages/lexical/src/__tests__/unit/LexicalListPlugin.test.tsx b/packages/lexical/src/__tests__/unit/LexicalListPlugin.test.tsx index ce83439276b..dc625395509 100644 --- a/packages/lexical/src/__tests__/unit/LexicalListPlugin.test.tsx +++ b/packages/lexical/src/__tests__/unit/LexicalListPlugin.test.tsx @@ -6,11 +6,11 @@ * */ import {ListItemNode, ListNode} from '@lexical/list'; +import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext'; +import {ContentEditable} from '@lexical/react/LexicalContentEditable'; +import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary'; import {ListPlugin} from '@lexical/react/LexicalListPlugin'; -import {useLexicalComposerContext} from '@lexical/react/src/LexicalComposerContext'; -import {ContentEditable} from '@lexical/react/src/LexicalContentEditable'; -import LexicalErrorBoundary from '@lexical/react/src/LexicalErrorBoundary'; -import {RichTextPlugin} from '@lexical/react/src/LexicalRichTextPlugin'; +import {RichTextPlugin} from '@lexical/react/LexicalRichTextPlugin'; import { INDENT_CONTENT_COMMAND, LexicalEditor, diff --git a/packages/lexical/src/__tests__/utils/index.tsx b/packages/lexical/src/__tests__/utils/index.tsx index 142ba6fc08d..694d30cbfe2 100644 --- a/packages/lexical/src/__tests__/utils/index.tsx +++ b/packages/lexical/src/__tests__/utils/index.tsx @@ -15,11 +15,11 @@ import {OverflowNode} from '@lexical/overflow'; import { InitialConfigType, LexicalComposer, -} from '@lexical/react/src/LexicalComposer'; +} from '@lexical/react/LexicalComposer'; import { createLexicalComposerContext, LexicalComposerContext, -} from '@lexical/react/src/LexicalComposerContext'; +} from '@lexical/react/LexicalComposerContext'; import {HeadingNode, QuoteNode} from '@lexical/rich-text'; import {TableCellNode, TableNode, TableRowNode} from '@lexical/table'; import {expect} from '@playwright/test';