File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -66,10 +66,9 @@ function makeMockClipboard(isSecureContext: boolean): MockClipboard {
66
66
}
67
67
68
68
function renderUseClipboard ( textToCopy : string ) {
69
- type Props = Readonly < { textToCopy : string } > ;
70
- return renderHook < UseClipboardResult , Props > (
71
- ( { textToCopy } ) => useClipboard ( textToCopy ) ,
72
- { initialProps : { textToCopy } } ,
69
+ return renderHook < UseClipboardResult , { hookText : string } > (
70
+ ( { hookText } ) => useClipboard ( hookText ) ,
71
+ { initialProps : { hookText : textToCopy } } ,
73
72
) ;
74
73
}
75
74
@@ -128,6 +127,9 @@ function scheduleTests(isHttps: boolean) {
128
127
expect ( clipboardText ) . toEqual ( textToCheck ) ;
129
128
} ;
130
129
130
+ /**
131
+ * Start of test cases
132
+ */
131
133
it ( "Copies the current text to the user's clipboard" , async ( ) => {
132
134
const hookText = "dogs" ;
133
135
const { result } = renderUseClipboard ( hookText ) ;
You can’t perform that action at this time.
0 commit comments