1- import { describe , it , expect , beforeEach } from 'bun:test'
1+ import { describe , it , expect , expectTypeOf , beforeEach } from 'bun:test'
22import { createPinia , setActivePinia } from 'pinia'
33import { useDragDropContext } from '@frontend/shared/composables/useDragDropContext'
44import { useDragDropStore } from '@frontend/features/data-processing/stores/drag-drop.store'
@@ -267,18 +267,18 @@ describe('useDragDropContext', () => {
267267 const context = useDragDropContext ( )
268268
269269 // Test that all expected methods exist
270- expect ( typeof context . startDrag ) . toBe ( 'function' )
271- expect ( typeof context . endDrag ) . toBe ( 'function' )
272- expect ( typeof context . enterDropZone ) . toBe ( 'function' )
273- expect ( typeof context . leaveDropZone ) . toBe ( 'function' )
274- expect ( typeof context . validateDrop ) . toBe ( 'function' )
275- expect ( typeof context . performDrop ) . toBe ( 'function' )
276- expect ( typeof context . createDropZoneConfig ) . toBe ( 'function' )
270+ expectTypeOf ( context . startDrag ) . toBeFunction ( )
271+ expectTypeOf ( context . endDrag ) . toBeFunction ( )
272+ expectTypeOf ( context . enterDropZone ) . toBeFunction ( )
273+ expectTypeOf ( context . leaveDropZone ) . toBeFunction ( )
274+ expectTypeOf ( context . validateDrop ) . toBeFunction ( )
275+ expectTypeOf ( context . performDrop ) . toBeFunction ( )
276+ expectTypeOf ( context . createDropZoneConfig ) . toBeFunction ( )
277277 } )
278278
279279 it ( 'should work with store setAvailableTargets method' , ( ) => {
280280 const store = useDragDropStore ( )
281- expect ( typeof store . setAvailableTargets ) . toBe ( 'function' )
281+ expectTypeOf ( store . setAvailableTargets ) . toBeFunction ( )
282282
283283 const targets = [ mockDropTarget ]
284284 store . setAvailableTargets ( targets )
@@ -289,7 +289,7 @@ describe('useDragDropContext', () => {
289289
290290 it ( 'should work with store getValidTargetsForColumn method' , ( ) => {
291291 const store = useDragDropStore ( )
292- expect ( typeof store . getValidTargetsForColumn ) . toBe ( 'function' )
292+ expectTypeOf ( store . getValidTargetsForColumn ) . toBeFunction ( )
293293
294294 store . setAvailableTargets ( [ mockDropTarget ] )
295295 const validTargets = store . getValidTargetsForColumn ( mockColumnInfo )
0 commit comments