diff options
Diffstat (limited to 'test/console')
-rw-r--r-- | test/console/completion/reducer.test.ts | 12 | ||||
-rw-r--r-- | test/console/components/console/Completion.test.tsx | 18 |
2 files changed, 15 insertions, 15 deletions
diff --git a/test/console/completion/reducer.test.ts b/test/console/completion/reducer.test.ts index b742872..91a6751 100644 --- a/test/console/completion/reducer.test.ts +++ b/test/console/completion/reducer.test.ts @@ -65,14 +65,14 @@ describe("completion reducer", () => { }); describe("selectNext", () => { - context("when no completion groups", () => { + describe("when no completion groups", () => { it("does nothing", () => { const nextState = reducer(defaultState, selectNext()); expect(nextState.select).equals(-1); }); }); - context("when no completion items", () => { + describe("when no completion items", () => { it("does nothing", () => { const state = { ...defaultState, @@ -83,7 +83,7 @@ describe("completion reducer", () => { }); }); - context("when completions exist", () => { + describe("when completions exist", () => { it("selects next selection", () => { let state: State = { ...defaultState, @@ -116,13 +116,13 @@ describe("completion reducer", () => { }); describe("selectPrev", () => { - context("when no completion groups", () => { + describe("when no completion groups", () => { it("does nothing", () => { const nextState = reducer(defaultState, selectPrev()); expect(nextState.select).equals(-1); }); - context("when no completion items", () => { + describe("when no completion items", () => { it("does nothing", () => { const state = { ...defaultState, @@ -134,7 +134,7 @@ describe("completion reducer", () => { }); }); - context("when completions exist", () => { + describe("when completions exist", () => { it("selects a previous completion", () => { let state: State = { ...defaultState, diff --git a/test/console/components/console/Completion.test.tsx b/test/console/components/console/Completion.test.tsx index 9b47637..063b1e3 100644 --- a/test/console/components/console/Completion.test.tsx +++ b/test/console/components/console/Completion.test.tsx @@ -100,7 +100,7 @@ describe("console/components/console/completion/Completion", () => { }); it("scrolls up to down with select", () => { - let component: ReturnType<ReactTestRenderer["create"]> | null = null; + let component: ReactTestRenderer.ReactTestRenderer | null = null; ReactTestRenderer.act(() => { component = ReactTestRenderer.create( @@ -108,7 +108,7 @@ describe("console/components/console/completion/Completion", () => { ); }); - const root = component.root; + const root = component!.root; let items = root.findAllByType(CompletionItem); let showns = root @@ -132,7 +132,7 @@ describe("console/components/console/completion/Completion", () => { ]); ReactTestRenderer.act(() => { - component.update( + component!.update( <Completion completions={completions} size={3} select={2} /> ); }); @@ -159,7 +159,7 @@ describe("console/components/console/completion/Completion", () => { expect(items[2].props.highlight).to.be.true; ReactTestRenderer.act(() => { - component.update( + component!.update( <Completion completions={completions} size={3} select={3} /> ); }); @@ -187,14 +187,14 @@ describe("console/components/console/completion/Completion", () => { }); it("scrolls down to up with select", () => { - let component: ReturnType<ReactTestRenderer["create"]> | null = null; + let component: ReactTestRenderer.ReactTestRenderer | null = null; ReactTestRenderer.act(() => { component = ReactTestRenderer.create( <Completion completions={completions} size={3} select={5} /> ); }); - const root = component.root; + const root = component!.root; let items = root.findAllByType(CompletionItem); let showns = root @@ -220,7 +220,7 @@ describe("console/components/console/completion/Completion", () => { expect(items[5].props.highlight).to.be.true; ReactTestRenderer.act(() => { - component.update( + component!.update( <Completion completions={completions} size={3} select={4} /> ); }); @@ -247,7 +247,7 @@ describe("console/components/console/completion/Completion", () => { expect(items[4].props.highlight).to.be.true; ReactTestRenderer.act(() => { - component.update( + component!.update( <Completion completions={completions} size={3} select={3} /> ); }); @@ -274,7 +274,7 @@ describe("console/components/console/completion/Completion", () => { expect(items[3].props.highlight).to.be.true; ReactTestRenderer.act(() => { - component.update( + component!.update( <Completion completions={completions} size={3} select={2} /> ); }); |