File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,10 @@ const mockKeyboardEvent = (key: string) =>
6666 } as unknown as React . KeyboardEvent < HTMLElement > )
6767
6868describe ( 'useTabs' , ( ) => {
69+ afterEach ( ( ) => {
70+ jest . restoreAllMocks ( )
71+ } )
72+
6973 it ( 'returns an object with the expected shape' , ( ) => {
7074 const { result} = renderUseTabsHook ( )
7175
@@ -1094,8 +1098,6 @@ describe('useTabs', () => {
10941098 } )
10951099
10961100 expect ( focusSpy ) . toHaveBeenCalledTimes ( 1 )
1097-
1098- focusSpy . mockRestore ( )
10991101 } )
11001102
11011103 it ( 'calls element.focus() when keyboard navigation occurs' , ( ) => {
@@ -1117,8 +1119,6 @@ describe('useTabs', () => {
11171119 } )
11181120
11191121 expect ( focusSpy ) . toHaveBeenCalledTimes ( 1 )
1120-
1121- focusSpy . mockRestore ( )
11221122 } )
11231123
11241124 it ( 'calls preventDefault on arrow key events' , ( ) => {
You can’t perform that action at this time.
0 commit comments