Skip to content

Commit fc82e59

Browse files
committed
INT-3336: Add comments and remove redundant filter
1 parent 7af5e89 commit fc82e59

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/test/ts/alien/Loader.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export const render = async (props: Partial<IAllProps> = {}, container: HTMLElem
4646
setTimeout(() => {
4747
Optional.from(ref.current)
4848
.bind((editorInstance) => Optional.from(editorInstance.editor?.targetElm))
49-
.filter((elm) => elm instanceof window.HTMLElement)
5049
.map(SugarElement.fromDom)
5150
.filter(SugarNode.isHTMLElement)
5251
.map((val) => val.dom)

src/test/ts/browser/EditorBehaviorTest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ describe('EditorBehaviourTest', () => {
8989
await ctx.reRender({ onSetContent: eventStore.createHandler('onSetContent') });
9090

9191
TinyAssertions.assertContent(ctx.editor, '<p>Initial Content</p>');
92-
await Waiter.pWait(0);
92+
await Waiter.pWait(0); // Wait for React's state updates to complete before setting new content
9393
ctx.editor.setContent('<p>New Content</p>');
9494

9595
eventStore.each<SetContentEvent>('onSetContent', (events) => {
@@ -115,7 +115,7 @@ describe('EditorBehaviourTest', () => {
115115
eventStore.clearState();
116116
ctx.editor.setContent('<p>Initial Content</p>');
117117
await ctx.reRender({ onSetContent: eventStore.createHandler('NewHandler') });
118-
await Waiter.pWait(0);
118+
await Waiter.pWait(0); // Wait for React's state updates to complete before setting new content
119119
ctx.editor.setContent('<p>New Content</p>');
120120

121121
eventStore.each<SetContentEvent>('InitialHandler', (events) => {

0 commit comments

Comments
 (0)