1- import { renderHook } from " @testing-library/react-hooks" ;
2- import * as useTween from " ../src/useTween" ;
3- import useInterpolations from " ../src/useInterpolations" ;
1+ import { renderHook } from ' @testing-library/react-hooks' ;
2+ import * as useTween from ' ../src/useTween' ;
3+ import useInterpolations from ' ../src/useInterpolations' ;
44
55let spyUseTween ;
66
77beforeEach ( ( ) => {
8- spyUseTween = jest . spyOn ( useTween , " default" ) . mockReturnValue ( 0.5 ) ;
8+ spyUseTween = jest . spyOn ( useTween , ' default' ) . mockReturnValue ( 0.5 ) ;
99} ) ;
1010
1111afterEach ( ( ) => {
1212 jest . restoreAllMocks ( ) ;
1313} ) ;
1414
15- it ( " should interpolate map values with default parameters" , ( ) => {
15+ it ( ' should interpolate map values with default parameters' , ( ) => {
1616 const { result } = renderHook ( ( ) =>
1717 useInterpolations ( {
1818 left : [ 0 , 100 ] ,
@@ -25,17 +25,17 @@ it("should interpolate map values with default parameters", () => {
2525 expect ( result . current . top ) . toBe ( 100 ) ;
2626 expect ( result . current . opacity ) . toBe ( 0.5 ) ;
2727 expect ( spyUseTween ) . toHaveBeenCalledTimes ( 1 ) ;
28- expect ( spyUseTween ) . toHaveBeenCalledWith ( " inCirc" , 200 , 0 ) ;
28+ expect ( spyUseTween ) . toHaveBeenCalledWith ( ' inCirc' , 200 , 0 ) ;
2929} ) ;
3030
31- it ( " should interpolate map values with custom parameters" , ( ) => {
31+ it ( ' should interpolate map values with custom parameters' , ( ) => {
3232 const { result } = renderHook ( ( ) =>
3333 useInterpolations (
3434 {
3535 x : [ 10 , 20 ] ,
3636 y : [ - 5 , 5 ] ,
3737 } ,
38- " outCirc" ,
38+ ' outCirc' ,
3939 500 ,
4040 100
4141 )
@@ -44,10 +44,10 @@ it("should interpolate map values with custom parameters", () => {
4444 expect ( result . current . x ) . toBe ( 15 ) ;
4545 expect ( result . current . y ) . toBe ( 0 ) ;
4646 expect ( spyUseTween ) . toHaveBeenCalledTimes ( 1 ) ;
47- expect ( spyUseTween ) . toHaveBeenCalledWith ( " outCirc" , 500 , 100 ) ;
47+ expect ( spyUseTween ) . toHaveBeenCalledWith ( ' outCirc' , 500 , 100 ) ;
4848} ) ;
4949
50- it ( " should interpolate at t=0" , ( ) => {
50+ it ( ' should interpolate at t=0' , ( ) => {
5151 spyUseTween . mockReturnValue ( 0 ) ;
5252
5353 const { result } = renderHook ( ( ) =>
@@ -61,7 +61,7 @@ it("should interpolate at t=0", () => {
6161 expect ( result . current . top ) . toBe ( 20 ) ;
6262} ) ;
6363
64- it ( " should interpolate at t=1" , ( ) => {
64+ it ( ' should interpolate at t=1' , ( ) => {
6565 spyUseTween . mockReturnValue ( 1 ) ;
6666
6767 const { result } = renderHook ( ( ) =>
@@ -75,12 +75,12 @@ it("should interpolate at t=1", () => {
7575 expect ( result . current . top ) . toBe ( 80 ) ;
7676} ) ;
7777
78- describe ( " when invalid map is provided" , ( ) => {
78+ describe ( ' when invalid map is provided' , ( ) => {
7979 beforeEach ( ( ) => {
80- jest . spyOn ( console , " error" ) . mockImplementation ( ( ) => { } ) ;
80+ jest . spyOn ( console , ' error' ) . mockImplementation ( ( ) => { } ) ;
8181 } ) ;
8282
83- it ( " should log an error when map is not an object" , ( ) => {
83+ it ( ' should log an error when map is not an object' , ( ) => {
8484 const { result } = renderHook ( ( ) =>
8585 useInterpolations ( null as unknown as Record < string , readonly [ number , number ] > )
8686 ) ;
@@ -92,7 +92,7 @@ describe("when invalid map is provided", () => {
9292 ) ;
9393 } ) ;
9494
95- it ( " should log an error when map value is not a tuple" , ( ) => {
95+ it ( ' should log an error when map value is not a tuple' , ( ) => {
9696 const { result } = renderHook ( ( ) =>
9797 useInterpolations ( {
9898 left : [ 10 ] as unknown as readonly [ number , number ] ,
@@ -106,10 +106,10 @@ describe("when invalid map is provided", () => {
106106 ) ;
107107 } ) ;
108108
109- it ( " should log an error when map value contains non-numbers" , ( ) => {
109+ it ( ' should log an error when map value contains non-numbers' , ( ) => {
110110 const { result } = renderHook ( ( ) =>
111111 useInterpolations ( {
112- left : [ "0" , 100 ] as unknown as readonly [ number , number ] ,
112+ left : [ '0' , 100 ] as unknown as readonly [ number , number ] ,
113113 } )
114114 ) ;
115115
@@ -120,7 +120,7 @@ describe("when invalid map is provided", () => {
120120 ) ;
121121 } ) ;
122122
123- it ( " should log an error when map value contains non-finite numbers" , ( ) => {
123+ it ( ' should log an error when map value contains non-finite numbers' , ( ) => {
124124 const { result } = renderHook ( ( ) =>
125125 useInterpolations ( {
126126 left : [ 0 , Infinity ] ,
0 commit comments