@@ -16,17 +16,14 @@ import {
1616 TEST_Z_INDEXES ,
1717} from "../utils/shared-test-helpers.js" ;
1818
19- // Create the mock Adhesive instance
2019const mockAdhesiveInstance = createMockAdhesive ( ) ;
2120
22- // Mock the Adhesive class
2321vi . mock ( "@adhesivejs/core" , ( ) => ( {
2422 Adhesive : {
2523 create : vi . fn ( ( ) => mockAdhesiveInstance ) ,
2624 } ,
2725} ) ) ;
2826
29- // Enhanced test component using useAdhesive hook
3027function TestHookComponent ( ) {
3128 const targetRef = useRef < HTMLDivElement > ( null ) ;
3229 const boundingRef = useRef < HTMLDivElement > ( null ) ;
@@ -97,7 +94,7 @@ describe("React Integration", () => {
9794
9895 describe ( "useAdhesive Hook" , ( ) => {
9996 describe ( "initialization and rendering" , ( ) => {
100- it ( "should render without errors" , ( ) => {
97+ it ( "renders without errors" , ( ) => {
10198 renderTestComponent ( ) ;
10299 const { stickyElement, toggleEnabledButton } = getTestElements ( ) ;
103100
@@ -106,14 +103,14 @@ describe("React Integration", () => {
106103 expect ( screen . getByText ( "Toggle (enabled)" ) ) . toBeInTheDocument ( ) ;
107104 } ) ;
108105
109- it ( "should create Adhesive instance on mount" , async ( ) => {
106+ it ( "creates Adhesive instance on mount" , async ( ) => {
110107 renderTestComponent ( ) ;
111108
112109 const { Adhesive } = await import ( "@adhesivejs/core" ) ;
113110 expect ( Adhesive . create ) . toHaveBeenCalledTimes ( 1 ) ;
114111 } ) ;
115112
116- it ( "should not create multiple instances on re-renders" , async ( ) => {
113+ it ( "does not create multiple instances on re-renders" , async ( ) => {
117114 const { rerender } = renderTestComponent ( ) ;
118115
119116 rerender ( < TestHookComponent /> ) ;
@@ -125,7 +122,7 @@ describe("React Integration", () => {
125122 } ) ;
126123
127124 describe ( "state management" , ( ) => {
128- it ( "should handle enabled toggle correctly" , async ( ) => {
125+ it ( "handles enabled toggle correctly" , async ( ) => {
129126 const user = userEvent . setup ( ) ;
130127 renderTestComponent ( ) ;
131128 const { toggleEnabledButton } = getTestElements ( ) ;
@@ -142,7 +139,7 @@ describe("React Integration", () => {
142139 expect ( screen . getByText ( "Toggle (enabled)" ) ) . toBeInTheDocument ( ) ;
143140 } ) ;
144141
145- it ( "should handle position changes correctly" , async ( ) => {
142+ it ( "handles position changes correctly" , async ( ) => {
146143 const user = userEvent . setup ( ) ;
147144 renderTestComponent ( ) ;
148145 const { togglePositionButton } = getTestElements ( ) ;
@@ -159,7 +156,7 @@ describe("React Integration", () => {
159156 expect ( screen . getByText ( "Position: top" ) ) . toBeInTheDocument ( ) ;
160157 } ) ;
161158
162- it ( "should handle offset changes correctly" , async ( ) => {
159+ it ( "handles offset changes correctly" , async ( ) => {
163160 const user = userEvent . setup ( ) ;
164161 renderTestComponent ( ) ;
165162 const { toggleOffsetButton } = getTestElements ( ) ;
@@ -176,7 +173,7 @@ describe("React Integration", () => {
176173 expect ( screen . getByText ( "Offset: 10" ) ) . toBeInTheDocument ( ) ;
177174 } ) ;
178175
179- it ( "should call updateOptions when options change" , async ( ) => {
176+ it ( "calls updateOptions when options change" , async ( ) => {
180177 const user = userEvent . setup ( ) ;
181178 renderTestComponent ( ) ;
182179 const {
@@ -215,7 +212,7 @@ describe("React Integration", () => {
215212 } ) ;
216213
217214 describe ( "cleanup and lifecycle" , ( ) => {
218- it ( "should cleanup on unmount without errors" , ( ) => {
215+ it ( "cleans up on unmount without errors" , ( ) => {
219216 const { unmount } = renderTestComponent ( ) ;
220217 const { stickyElement } = getTestElements ( ) ;
221218
@@ -224,7 +221,7 @@ describe("React Integration", () => {
224221 expect ( ( ) => unmount ( ) ) . not . toThrow ( ) ;
225222 } ) ;
226223
227- it ( "should handle disabled state properly" , ( ) => {
224+ it ( "handles disabled state properly" , ( ) => {
228225 function DisabledComponent ( ) {
229226 const targetRef = useRef < HTMLDivElement > ( null ) ;
230227 const boundingRef = useRef < HTMLDivElement > ( null ) ;
@@ -248,21 +245,21 @@ describe("React Integration", () => {
248245
249246 describe ( "AdhesiveContainer Component" , ( ) => {
250247 describe ( "basic rendering" , ( ) => {
251- it ( "should render children correctly" , ( ) => {
248+ it ( "renders children correctly" , ( ) => {
252249 renderContainer ( ) ;
253250
254251 expect ( screen . getByTestId ( "container-child" ) ) . toBeInTheDocument ( ) ;
255252 expect ( screen . getByText ( "Container Content" ) ) . toBeInTheDocument ( ) ;
256253 } ) ;
257254
258- it ( "should handle empty children" , ( ) => {
255+ it ( "handles empty children" , ( ) => {
259256 render ( < AdhesiveContainer /> ) ;
260257 // Should not throw errors
261258 } ) ;
262259 } ) ;
263260
264261 describe ( "styling and customization" , ( ) => {
265- it ( "should apply custom class names" , async ( ) => {
262+ it ( "applies custom class names" , async ( ) => {
266263 const customProps = {
267264 className : "custom-class" ,
268265 outerClassName : CUSTOM_CLASS_NAMES . outerClassName ,
@@ -292,7 +289,7 @@ describe("React Integration", () => {
292289 ) ;
293290 } ) ;
294291
295- it ( "should handle z-index styling" , ( ) => {
292+ it ( "handles z-index styling" , ( ) => {
296293 renderContainer ( { zIndex : TEST_Z_INDEXES [ 3 ] } ) ;
297294
298295 expect ( screen . getByTestId ( "container-child" ) ) . toBeInTheDocument ( ) ;
@@ -301,7 +298,7 @@ describe("React Integration", () => {
301298
302299 describe ( "configuration options" , ( ) => {
303300 configurationTestCases . forEach ( ( { name, props } ) => {
304- it ( `should handle ${ name } correctly` , ( ) => {
301+ it ( `handles ${ name } correctly` , ( ) => {
305302 const { rerender } = renderContainer ( props ) ;
306303
307304 expect ( screen . getByTestId ( "container-child" ) ) . toBeInTheDocument ( ) ;
@@ -317,7 +314,7 @@ describe("React Integration", () => {
317314 } ) ;
318315 } ) ;
319316
320- it ( "should handle bounding element with string selector" , ( ) => {
317+ it ( "handles bounding element with string selector" , ( ) => {
321318 render (
322319 < div className = "bounding-container" >
323320 < AdhesiveContainer boundingEl = ".bounding-container" >
0 commit comments