We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ba38fd commit 176e317Copy full SHA for 176e317
test/useWizard.test.tsx
@@ -38,6 +38,20 @@ describe('useWizard', () => {
38
expect(result.current.stepCount).toBe(2);
39
});
40
41
+ test('should set step count to one when using falsy step', () => {
42
+ const { result } = renderHook(() => useWizard(), {
43
+ wrapper: ({ children }) => (
44
+ <Wizard>
45
+ <p>step 1 {children}</p>
46
+ <p>step 2 {children}</p>
47
+ {false && <p>step 3 {children}</p>}
48
+ </Wizard>
49
+ ),
50
+ });
51
+
52
+ expect(result.current.stepCount).toBe(2);
53
54
55
test('should set active step to one', () => {
56
const { result } = renderUseWizardHook(1);
57
0 commit comments