diff --git a/packages/lexical-utils/src/__tests__/unit/LexicalNodeHelpers.test.ts b/packages/lexical-utils/src/__tests__/unit/LexicalNodeHelpers.test.ts index 8740dc140484..ed80d19e9a48 100644 --- a/packages/lexical-utils/src/__tests__/unit/LexicalNodeHelpers.test.ts +++ b/packages/lexical-utils/src/__tests__/unit/LexicalNodeHelpers.test.ts @@ -207,7 +207,7 @@ describe('LexicalNodeHelpers tests', () => { test('DFS of empty ParagraphNode returns only itself', async () => { const editor: LexicalEditor = testEnv.editor; - let paragraphKey; + let paragraphKey: string; await editor.update(() => { const root = $getRoot(); @@ -222,7 +222,7 @@ describe('LexicalNodeHelpers tests', () => { root.append(paragraph, paragraph2); }); await editor.update(() => { - const paragraph = $getNodeByKey(paragraphKey); + const paragraph = $getNodeByKey(paragraphKey)!; expect($dfs(paragraph)).toEqual([ {